Exemple #1
0
 private void f_Load_Sua()
 {
     try
     {
         if (m_id != "")
         {
             string atmp = m_id;
             m_id = "";
             foreach (DataRow r in m_v.f_get_v_nhomdlogin(atmp, "", "", "", "").Tables[0].Rows)
             {
                 m_id             = r["id"].ToString();
                 m_nhom           = r["nhom"].ToString();
                 m_id_bv_so       = r["id_bv_so"].ToString();
                 m_right_         = r["right_"].ToString();
                 txtMa.Text       = r["ma"].ToString();
                 txtTen.Text      = r["ten"].ToString();
                 txtDiengiai.Text = r["diengiai"].ToString();
                 txtMa.Focus();
                 rdDatabase.Checked    = m_nhom == rdDatabase.Tag.ToString();
                 rdApplication.Checked = m_nhom == rdApplication.Tag.ToString();
                 rdAdmin.Checked       = m_nhom == rdAdmin.Tag.ToString();
                 rdUser.Checked        = m_nhom == rdUser.Tag.ToString();
                 break;
             }
             if (m_nhom == "")
             {
                 rdUser.Checked = true;
             }
         }
     }
     catch
     {
     }
 }
Exemple #2
0
 private void f_Load_CB_Nhom()
 {
     try
     {
         DataSet ads = m_v.f_get_v_nhomdlogin("", "", "", "", "");
         cbNhom.DisplayMember = "TEN";
         cbNhom.ValueMember   = "ID";
         cbNhom.DataSource    = ads.Tables[0];
     }
     catch
     {
     }
 }
Exemple #3
0
 private void f_Load_CB_Nhom()
 {
     try
     {
         DataSet ads = m_v.f_get_v_nhomdlogin("", "", "", "", "");
         if (ads.Tables[0].Select("id=-1").Length <= 0)
         {
             DataRow r = ads.Tables[0].NewRow();
             r["id"]  = -1;
             r["ten"] = "...";
             ads.Tables[0].Rows.InsertAt(r, ads.Tables[0].Rows.Count);
         }
         cbNhom.DisplayMember = "TEN";
         cbNhom.ValueMember   = "ID";
         cbNhom.DataSource    = ads.Tables[0];
         cbNhom.SelectedValue = m_id_nhom;
     }
     catch
     {
     }
 }