示例#1
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            int userID = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colUserID));

            if (userID != Global.UserID)
            {
                MessageBox.Show("Bạn không có quyền sửa công việc này?", TextUtils.Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                return;
            }
            long id = TextUtils.ToInt64(grvData.GetFocusedRowCellValue(colID));

            if (id == 0)
            {
                return;
            }
            TheoDoiModel model = (TheoDoiModel)TheoDoiBO.Instance.FindByPK(id);

            _rownIndex = grvData.FocusedRowHandle;

            frmWorkDiary frm = new frmWorkDiary();

            frm.WorkDiary       = model;
            frm.LoadDataChange += main_LoadDataChange;
            frm.Show();
        }
示例#2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            frmWorkDiary frm = new frmWorkDiary();

            frm.LoadDataChange += main_LoadDataChange;
            frm.Show();
        }