Example #1
0
 private void BTN_Limpar(object sender, RoutedEventArgs e)
 {
     TxtModelo.Clear();
     RB_Sim.IsChecked = false;
     RB_Nao.IsChecked = false;
     TxtPreco.Text    = "";
     TxtMaterial.Clear();
     TxtCor.Clear();
     TextBox38.Clear();
     TextBox38.IsEnabled  = false;
     CheckBox38.IsChecked = false;
     TextBox39.Clear();
     TextBox39.IsEnabled  = false;
     CheckBox39.IsChecked = false;
     TextBox40.Clear();
     TextBox40.IsEnabled  = false;
     CheckBox40.IsChecked = false;
     TextBox41.Clear();
     TextBox41.IsEnabled  = false;
     CheckBox41.IsChecked = false;
     TextBox42.Clear();
     TextBox42.IsEnabled  = false;
     CheckBox42.IsChecked = false;
     TextBox43.Clear();
     TextBox43.IsEnabled  = false;
     CheckBox43.IsChecked = false;
     TextBox44.Clear();
     TextBox44.IsEnabled  = false;
     CheckBox44.IsChecked = false;
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     empno = Convert.ToInt32(Request.QueryString["Empno"].ToString());
     if (!IsPostBack)
     {
         string         Q    = "Select * from mstrCategory";
         SqlCommand     com  = new SqlCommand(Q, dbcls.CONN());
         SqlDataAdapter adpt = new SqlDataAdapter(com);
         DataTable      dt   = new DataTable();
         adpt.Fill(dt);
         TextBox38.DataSource = dt;
         TextBox38.DataBind();
         TextBox38.DataTextField  = "category";
         TextBox38.DataValueField = "cid";
         TextBox38.DataBind();
         DropDownList7.DataSource = dt;
         DropDownList7.DataBind();
         DropDownList7.DataTextField  = "category";
         DropDownList7.DataValueField = "cid";
         DropDownList7.DataBind();
         DropDownList9.DataSource = dt;
         DropDownList9.DataBind();
         DropDownList9.DataTextField  = "category";
         DropDownList9.DataValueField = "cid";
         DropDownList9.DataBind();
         DropDownList11.DataSource = dt;
         DropDownList11.DataBind();
         DropDownList11.DataTextField  = "category";
         DropDownList11.DataValueField = "cid";
         DropDownList11.DataBind();
         DropDownList13.DataSource = dt;
         DropDownList13.DataBind();
         DropDownList13.DataTextField  = "category";
         DropDownList13.DataValueField = "cid";
         DropDownList13.DataBind();
         DropDownList15.DataSource = dt;
         DropDownList15.DataBind();
         DropDownList15.DataTextField  = "category";
         DropDownList15.DataValueField = "cid";
         DropDownList15.DataBind();
         BindTextBoxvalues();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         string         Q    = "Select * from mstrCategory";
         SqlCommand     com  = new SqlCommand(Q, dbcls.CONN());
         SqlDataAdapter adpt = new SqlDataAdapter(com);
         DataTable      dt   = new DataTable();
         adpt.Fill(dt);
         TextBox38.DataSource = dt;
         TextBox38.DataBind();
         TextBox38.DataTextField  = "category";
         TextBox38.DataValueField = "cid";
         TextBox38.DataBind();
         DropDownList7.DataSource = dt;
         DropDownList7.DataBind();
         DropDownList7.DataTextField  = "category";
         DropDownList7.DataValueField = "cid";
         DropDownList7.DataBind();
         DropDownList9.DataSource = dt;
         DropDownList9.DataBind();
         DropDownList9.DataTextField  = "category";
         DropDownList9.DataValueField = "cid";
         DropDownList9.DataBind();
         DropDownList11.DataSource = dt;
         DropDownList11.DataBind();
         DropDownList11.DataTextField  = "category";
         DropDownList11.DataValueField = "cid";
         DropDownList11.DataBind();
         DropDownList13.DataSource = dt;
         DropDownList13.DataBind();
         DropDownList13.DataTextField  = "category";
         DropDownList13.DataValueField = "cid";
         DropDownList13.DataBind();
         DropDownList15.DataSource = dt;
         DropDownList15.DataBind();
         DropDownList15.DataTextField  = "category";
         DropDownList15.DataValueField = "cid";
         DropDownList15.DataBind();
     }
 }