BKI_DichVuMatDat.DanhMuc.f150_danh_muc_nhan_su_v2.DisplayForUpdate C# (CSharp) Method

DisplayForUpdate() public method

public DisplayForUpdate ( US_DM_NHAN_VIEN v_us ) : void
v_us US_DM_NHAN_VIEN
return void
        public void DisplayForUpdate(US_DM_NHAN_VIEN v_us)
        {
            m_e_form_mode = DataEntryFormMode.UpdateDataState;
            Text = "F150 - Sửa thông tin nhân viên";
            layoutControlItem16.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            m_us = v_us;
            us_to_form(v_us);
            this.ShowDialog();
        }

Usage Example

 private void m_cmd_sua_Click(object sender, EventArgs e)
 {
     try
     {
         DataRow v_dr = m_grv.GetDataRow(m_grv.FocusedRowHandle);
         US_DM_NHAN_VIEN v_us = new US_DM_NHAN_VIEN(CIPConvert.ToDecimal(v_dr["ID"].ToString()));
         f150_danh_muc_nhan_su_v2 v_f = new f150_danh_muc_nhan_su_v2();
         v_f.DisplayForUpdate(v_us);
         load_data_to_grid();
         focus_row(CIPConvert.ToDecimal(v_dr["ID"].ToString()));
     }
     catch(Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(v_e);
     }
 }