private void f_Load_Sua() { try { if (m_id != "") { string atmp = m_id; m_id = ""; foreach (DataRow r in m_v.f_get_v_dlogin(atmp, "", "", "", "").Tables[0].Rows) { m_id = r["id"].ToString(); m_right_ = r["right_"].ToString(); m_loaivp = r["loaivp"].ToString(); txtUsername.Text = r["userid"].ToString(); txtPassword.Text = ""; // r["password_"].ToString(); txtPassword1.Text = ""; // r["password_"].ToString(); txtHoten.Text = r["hoten"].ToString(); try { cbNhom.SelectedValue = r["id_nhom"].ToString(); } catch { } break; } } } catch { } }
private void f_Load_Sua() { try { if (m_id != "") { string atmp = m_id; m_id = ""; foreach (DataRow r in m_v.f_get_v_dlogin(atmp, "", "", "", "").Tables[0].Rows) { m_id = r["id"].ToString(); m_id_nhom = r["id_nhom"].ToString(); m_right_ = r["right_"].ToString(); m_loaivp = r["loaivp"].ToString(); txtUsername.Text = r["userid"].ToString(); txtPassword.Text = r["password_"].ToString(); txtPassword1.Text = r["password_"].ToString(); txtHoten.Text = r["hoten"].ToString(); i_chinhanh = int.Parse(r["chinhanh"].ToString()); try { cbNhom.SelectedValue = m_id_nhom; } catch { } try { cbChinhanh.SelectedValue = i_chinhanh.ToString(); } catch { } txtUsername.Focus(); break; } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }