Esempio n. 1
0
    protected void btnshow_Click(object sender, EventArgs e)
    {
        if (Panin.Visible == true)
        {
            pnlSpace.Visible = false;
        }
        else
        {
            con.Close();
        } con.Open();
        SqlCommand    cmd = new SqlCommand("select ID,Name,Address,City,State,Pincode,Contact,Mobile,Email from InstitutionReg where Session='" + lblSessionHiddend.Text.ToString() + "'AND Name='" + ddlInstitute.SelectedItem.Text.ToString() + "'", con);
        SqlDataReader dr;

        dr = cmd.ExecuteReader();
        if (dr.Read() == true)
        {
            lblid.Text      = dr["ID"].ToString();
            lblname.Text    = dr["Name"].ToString();
            lbladdress.Text = dr["Address"].ToString();
            lblcity.Text    = dr["City"].ToString();
            lblstate.Text   = dr["State"].ToString();
            lblpincode.Text = dr["Pincode"].ToString();
            lblcontact.Text = dr["Contact"].ToString();
            lblmobile.Text  = dr["Mobile"].ToString();
            lblemail.Text   = dr["Email"].ToString();
        }
        else
        {
            lblid.Text      = ""; lblname.Text = ""; lbladdress.Text = ""; lblcity.Text = ""; lblstate.Text = ""; lblpincode.Text = "";
            lblcontact.Text = ""; lblmobile.Text = "";
            lblemail.Text   = "";
        } dr.Close();
        con.Close(); con.Dispose(); Panin.Visible = true;
        Txttitle.Focus();
    }
Esempio n. 2
0
 private void filldescriptn()
 {
     if (txtstream.Text == "" & txtcourse.Text == "")
     {
         lblExcepitnProject.ForeColor = System.Drawing.Color.Red;
         txtIMID.Focus();
     }
     else
     {
         if (Txttitle.Text == "")
         {
             lblExcepitnProject.Text      = "Please Insert Project Title and Description Details.";
             lblExcepitnProject.ForeColor = System.Drawing.Color.Red;
             Txttitle.Focus();
         }
         else
         {
             con.Close(); con.Open();
             SqlCommand cmd1 = new SqlCommand("select Description from ProjectName where ProjectTitle='" + Txttitle.Text.ToString() + "'", con);
             lblExcepitnProject.Text = "";
             con.Close();
             con.Dispose();
             txtDurtaion.Focus();
         }
     }
 }
Esempio n. 3
0
 private void limpiarform()
 {
     TxtCont.Clear();
     Txttitle.Clear();
 }