当前位置: 首页>>代码示例>>C#>>正文


C# Class1.connect方法代码示例

本文整理汇总了C#中Class1.connect方法的典型用法代码示例。如果您正苦于以下问题:C# Class1.connect方法的具体用法?C# Class1.connect怎么用?C# Class1.connect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Class1的用法示例。


在下文中一共展示了Class1.connect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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;
        }
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:25,代码来源:contactus.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Class1 x = new Class1();
        x.connect();

          if(!IsPostBack)

          {
          string q = "select * from Polls";

          DataTable dt = x.display(q);

          gv1.DataSource = dt;
          gv1.DataBind();

            if (Request.QueryString["iid"] != null)
            {
                string id= Request.QueryString["iid"].ToString();

                string s = "delete from polls where id_poll=" + id;

                x.allquery(s);

                Response.Redirect("deletepoll.aspx");
            }

        }
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:28,代码来源:Deletepoll.aspx.cs

示例3: 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);
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:27,代码来源:registration.aspx.cs

示例4: b1_Click

    protected void b1_Click(object sender, EventArgs e)
    {
        Class1 X = new Class1();
        X.connect();
        string  vartxt= Textbox1.Text ;
        string Password;
          string q="select * from Studentmaster where Email='"+vartxt+"'";
        DataTable dt = X.display(q);
        if (dt.Rows.Count > 0)
        {
            Password = dt.Rows[0]["Password"].ToString();

            if (Send(SQLFix(vartxt), SQLFix("forget password "), SQLFix(Password)))
            {

                msg.Visible = true;

            }
            else
            {
                msg.Text= "Problem with Sending Email , Try after some time";
                msg.Visible = true;
            }

        }
        else
        {
            msg.Visible = true;
            msg.Text = "invalid email id";
        }
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:31,代码来源:forgotpassword.aspx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Class1 x = new Class1();
        x.connect();

        string q = "select * from Inquiry";
        DataTable dt = x.display(q);

        gv1.DataSource = dt;
        gv1.DataBind();
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:11,代码来源:answerinquiries.aspx.cs

示例6: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Class1 x = new Class1();

        x.connect();

        string q = "select * from Course_master where id_institute=" + Session["Id_institute"].ToString();
        DataTable dt = x.display(q);

        g2.DataSource = dt;
        g2.DataBind();
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:12,代码来源:coursesview.aspx.cs

示例7: 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);
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:12,代码来源:sregister.aspx.cs

示例8: 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;
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:15,代码来源:course.aspx.cs

示例9: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Class1 x = new Class1();

        x.connect();
        if(Session["Id_institute"] ==null)
        {
            Response.Redirect("../login/institute_login.html");
        }

        string q = "select * from view1 where id_institute=" + Session["Id_institute"].ToString();
         DataTable dt=x.display(q);

           g1.DataSource = dt;
        g1.DataBind();
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:16,代码来源:institutehome.aspx.cs

示例10: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Class1 x = new Class1();

        string id = Request.QueryString["iid"];

        string q = "select * from inquiry where id_inquiry=" + id;

        x.connect();

           DataTable dt =x.display(q);
        TextBox1.Text=dt.Rows[0][0].ToString();
        TextBox2.Text=dt.Rows[0][1].ToString();
        TextBox3.Text=dt.Rows[0][2].ToString();
        TextBox4.Text=dt.Rows[0][4].ToString();
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:16,代码来源:answerinquirey.aspx.cs

示例11: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Class1 x = new Class1();
        x.connect();

          // string em= Session["email"].ToString();

        string q = "select * from Institutemaster";// where email='"+em+"'";

        DataTable dt = x.display(q);

        txt1.Text=dt.Rows[0][0].ToString();
        txt2.Text=dt.Rows[0][4].ToString();
        txt3.Text=dt.Rows[0][1].ToString();
        txt4.Text=dt.Rows[0][2].ToString();
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:16,代码来源:Institute+profile.aspx.cs

示例12: b2_Click1

    protected void b2_Click1(object sender, EventArgs e)
    {
        Class1 x = new Class1();

        x.connect();
        string q = "select * from AdminMaster where username='" + Textbox1.Text + "' and password='" + Textbox2.Text + "'";
        DataTable dt = x.find(q);

        if (dt.Rows.Count == 0)
        {

        }
        else
        {
            Response.Redirect("../../adminhome.aspx");
        }
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:17,代码来源:alogin.aspx.cs

示例13: 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";
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:18,代码来源:uploadphoto.aspx.cs

示例14: 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);
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:20,代码来源:add_poll_new.aspx.cs

示例15: 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);
    }
开发者ID:milincjoshi,项目名称:Career_Guidance_System,代码行数:22,代码来源:iregister.aspx.cs


注:本文中的Class1.connect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。