예제 #1
0
        /// <summary>
        /// hàm thực hiện thêm mới nhân viên
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdNew_Click(object sender, EventArgs e)
        {
            frm_themmoi_nhanvien frm = new frm_themmoi_nhanvien();

            frm.em_Action     = action.Insert;
            frm.p_dtStaffList = m_dtStaffList;
            frm.ShowDialog();
            ModifyCommand();
        }
예제 #2
0
        private void grdStaffList_DoubleClick(object sender, EventArgs e)
        {
            if (!Utility.isValidGrid(grdStaffList))
            {
                return;
            }
            if (v_StaffList_Id <= -1)
            {
                return;
            }
            frm_themmoi_nhanvien frm = new frm_themmoi_nhanvien();

            frm.em_Action     = action.Update;
            frm.txtID.Text    = v_StaffList_Id.ToString();
            frm.UserName      = Utility.sDbnull(grdStaffList.GetValue("user_name"));
            frm.p_dtStaffList = m_dtStaffList;
            frm.ShowDialog();
            ModifyCommand();
        }
예제 #3
0
 /// <summary>
 /// hàm thực hiện thêm mới nhân viên
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmdNew_Click(object sender, EventArgs e)
 {
     frm_themmoi_nhanvien frm=new frm_themmoi_nhanvien();
     frm.em_Action = action.Insert;
     frm.p_dtStaffList = m_dtStaffList;
     frm.ShowDialog();
     ModifyCommand();
 }
예제 #4
0
 /// <summary>
 /// sửa thông tin của phần nhân viên
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmdEdit_Click(object sender, EventArgs e)
 {
     if (!Utility.isValidGrid(grdStaffList)) return;
     if(v_StaffList_Id<=-1)return;
     frm_themmoi_nhanvien frm = new frm_themmoi_nhanvien();
     frm.em_Action = action.Update;
     frm.txtID.Text = v_StaffList_Id.ToString();
     frm.UserName = Utility.sDbnull(grdStaffList.GetValue("user_name"));
     frm.p_dtStaffList = m_dtStaffList;
     frm.ShowDialog();
     ModifyCommand();
 }