本文整理汇总了C#中Class1.autoincrement方法的典型用法代码示例。如果您正苦于以下问题:C# Class1.autoincrement方法的具体用法?C# Class1.autoincrement怎么用?C# Class1.autoincrement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Class1
的用法示例。
在下文中一共展示了Class1.autoincrement方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bt1_Click
protected void bt1_Click(object sender, EventArgs e)
{
Class1 x = new Class1();
x.connect();
string at = "select max(Id_institute) from Institutemaster ";
int ff = x.autoincrement(at);
string varidpol = ff.ToString();
string varname=txtname.Text;
string varadd=txtaddress.Text;
string varcity=txtcity.Text;
string varstate=txtstate.Text;
string varcountry=ddlcountry.SelectedItem.ToString();
string varabout=txtabout.Text;
string varaff=txtaffiliated.Text;
string varcat=ddlcategory.SelectedItem.ToString();
string varsub = ddlsub.SelectedItem.ToString();
string varwebsite=txtwebsite.Text;
string varemail=txtemail.Text;
string varpass= txtpassword.Text;
string varhelp=txthelp.Text;
string varapp = txtapp.Text;
string q = "insert into Institutemaster(Id_institute,Name,Address,City,State,Country,About,Affiliated,Category,Subcategory,Website,Email,Password,Helplineno,Approved) values("+ varidpol +",'"+varname +"','"+varadd +"','"+varcity +"','"+varstate +"','"+varcountry +"','"+varabout +"','"+varaff +"','"+varcat +"','"+varsub +"','"+varwebsite +"','"+varemail +"','"+varpass +"',"+varhelp+",'"+varapp +"')";
x.allquery(q);
}
示例2: b1_Click
protected void b1_Click(object sender, EventArgs e)
{
Class1 X = new Class1();
X.connect();
string at = "select max(id_feedback) from feedback ";
int ff = X.autoincrement(at);
string msg = "name is "+ t1.Text + "E-mail is" +t2.Text + "Phone-no is"+t3.Text + "Message is"+t4.Text;
string w = "insert into feedback values('"+ff+"','"+t1.Text+"','"+t2.Text+"','"+t3.Text+"','"+t4.Text+"')";
int n= X.allquery(w);
if (Send(SQLFix("[email protected]"), SQLFix("FORGET PASSWORD "), SQLFix(msg)))
{
abcxyz.Text = "Your inquiry has been succesfully sent";
abcxyz.Visible = true;
}
else
{
abcxyz.Text = "Problem with Sending Email , Try after some time";
abcxyz.Visible = true;
}
}
示例3: signup_Click
protected void signup_Click(object sender, EventArgs e)
{
Class1 x = new Class1();
x.connect();
string at = "select max(Id_Student) from studentmaster";
int studentid = x.autoincrement(at);
string m = "insert into Studentmaster values ('" + studentid + "','" + name.Text + "','" + dob.Text + "','" + address.Text + "','" + recentqualification.Text + "','" + email.Text + "','" + city.Text + "','" + state.Text + "','" + country.Text + "','" + username.Text + "','" + password.Text + "','" + newsletter.SelectedItem + "','" + phone.Text + "')";
x.allquery(m);
}
示例4: button1_Click
protected void button1_Click(object sender, EventArgs e)
{
Class1 x = new Class1();
x.connect();
string at = "select max(Id_course) from Course_master ";
int ff = x.autoincrement(at);
string varidpol = ff.ToString();
string q = "insert into Course_master values(" + varidpol + ",'" + TextBox1.Text + "','" + textbox2.Text + "','" + textbox3.Text + "')";
x.allquery(q);
TextBox1.Text = "";
textbox2.Text = "";
textbox3.Text = "";
Label1.Visible = true;
}
示例5: Button1_Click
protected void Button1_Click(object sender, EventArgs e)
{
Class1 x = new Class1();
x.connect();
string varinstitut = Session["Id_institute"].ToString(); ;
int varphotoid = x.autoincrement("select max(id_photos) from institutephotogal");
string varphoto = "photos/" + FileUpload1.FileName;
FileUpload1.SaveAs(MapPath(varphoto));
Image1.ImageUrl = varphoto;
string q = "insert into institutephotogal values(" + varinstitut + "," + varphotoid + ",'" + varphoto + "')";
x.allquery(q);
ltr.Text = "Photo Uploaded";
}
示例6: add_Click
protected void add_Click(object sender, EventArgs e)
{
Class1 x = new Class1();
x.connect();
string at = "select max(id_poll) from Polls ";
int ff = x.autoincrement(at);
string varidpol = ff.ToString();
string varque = txtques1.Text;
string varop1 = txtop1.Text;
string varop2 = txtop2.Text;
string varop3 = txtop3.Text;
string varop4 = txtop4.Text;
string q = "insert into polls values(" + varidpol + ",'" + varque + "','" + varop1 + "','" + varop2 + "','" + varop3 + "','" + varop4 + "')";
int n = x.allquery(q);
}
示例7: isignup_Click
protected void isignup_Click(object sender, EventArgs e)
{
Class1 x = new Class1();
x.connect();
string ai = "select max(Id_institute) from Institutemaster";
int instid = x.autoincrement(ai);
string filename = "../logo/default.jpg";
if (FileUpload1.HasFile)
{
filename = "../logo/" + FileUpload1.FileName;
FileUpload1.SaveAs(MapPath(filename));
}
else
{
filename = "../logo/untitled.png";
// logo.SaveAs(MapPath(filename));
}
string m = "insert into institutemaster values ('" + instid + "','" + name.Text + "','" + addr.Text + "','" + helpline.Text + "','" + category.Text + "','" + Subcategory.Text + "','" + City.Text + "','" + State.Text + "','" + cont.SelectedItem + "','" + about.Text + "','" + aff.Text + "','" + website.Text + "','" + Email.Text + "','" + password.Text + "','Yes','" + filename + "')";
x.allquery(m);
}