Exemple #1
0
 protected void btn_chamnhuanbut_click(object sender, EventArgs e)
 {
     foreach (DataGridItem m_Item in DataGrid_tinbaiAnh.Items)
     {
         CheckBox chk_Select      = (CheckBox)m_Item.FindControl("optSelect");
         TextBox  txtsotientinbai = (TextBox)m_Item.FindControl("txtsotientinbai");
         TextBox  txt_ghichu      = (TextBox)m_Item.FindControl("txt_ghichu");
         Label    lblMatinbai     = (Label)m_Item.FindControl("lblMatinbai");
         Label    lblTacgiaanh    = (Label)m_Item.FindControl("lblTacgiaanh");
         Label    lblsotientinbai = (Label)m_Item.FindControl("lblsotientinbai");
         Label    LabelGhichu     = (Label)m_Item.FindControl("LabelGhichu");
         double   id = double.Parse(DataGrid_tinbaiAnh.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString());
         if (txtsotientinbai.Text.Trim() != "")
         {
             Daltinbai.Sp_Cham_NhuanButAnh(0, double.Parse(txtsotientinbai.Text.Trim().Replace(",", "")), int.Parse(lblTacgiaanh.Text), id, txt_ghichu.Text.Trim(), _user.UserID);
         }
         lblsotientinbai.Text    = txtsotientinbai.Text.Trim();
         LabelGhichu.Text        = txt_ghichu.Text.Trim();
         lblsotientinbai.Visible = true;
         LabelGhichu.Visible     = true;
         txtsotientinbai.Visible = false;
         txt_ghichu.Visible      = false;
     }
 }