示例#1
0
        /// <summary>
        /// THUC HIEN THAO TAC THEM MOI KHOA PHONG
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdNew_Click(object sender, EventArgs e)
        {
            frm_themmoi_phongban frm = new frm_themmoi_phongban();

            frm.dsDepartment = dsTable;
            frm.m_enAction   = action.Insert;
            frm.ShowDialog();
            ModifyCommand();
        }
        /// <summary>
        /// THUC HIEN SUA THONG TIN
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            if (grdPhongBan.CurrentRow != null)
            {
                if(v_Department_id<=-1)return;
                frm_themmoi_phongban frm = new frm_themmoi_phongban();
                frm.dsDepartment = dsTable;
                frm.txtID.Text = v_Department_id.ToString();
                frm.drDepartment = Utility.FetchOnebyCondition(dsTable,DmucKhoaphong.Columns.IdKhoaphong+ "=" + v_Department_id);
                frm.m_enAction = action.Update;
                frm.ShowDialog();

                ModifyCommand();
            }
        }
示例#3
0
        /// <summary>
        /// THUC HIEN SUA THONG TIN
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            if (grdPhongBan.CurrentRow != null)
            {
                if (v_Department_id <= -1)
                {
                    return;
                }
                frm_themmoi_phongban frm = new frm_themmoi_phongban();
                frm.dsDepartment = dsTable;
                frm.txtID.Text   = v_Department_id.ToString();
                frm.drDepartment = Utility.FetchOnebyCondition(dsTable, DmucKhoaphong.Columns.IdKhoaphong + "=" + v_Department_id);
                frm.m_enAction   = action.Update;
                frm.ShowDialog();

                ModifyCommand();
            }
        }
示例#4
0
 /// <summary>
 /// THUC HIEN THAO TAC THEM MOI KHOA PHONG
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmdNew_Click(object sender, EventArgs e)
 {
     frm_themmoi_phongban frm = new frm_themmoi_phongban();
     frm.dsDepartment = dsTable;
     frm.m_enAction = action.Insert;
     frm.ShowDialog();
     ModifyCommand();
 }