Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnUpdate_Click(object sender, DirectEventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(hdfId.Text))
                {
                    return;
                }
                var colDynamic = SalaryBoardDynamicColumnController.GetById(Convert.ToInt32(hdfId.Text));
                if (colDynamic != null)
                {
                    colDynamic.ColumnExcel = txtUpdateColumnExcel.Text;
                    colDynamic.Value       = txtUpdateValue.Text;
                    colDynamic.IsInUsed    = chk_IsInUsedUpdate.Checked;
                    colDynamic.Display     = txtUpdateDisplay.Text;
                    colDynamic.ColumnCode  = txtUpdateColumnCode.Text;
                }
                ;
                SalaryBoardDynamicColumnController.Update(colDynamic);

                wdUpdateColumnDynamic.Hide();
                gridColumnDynamic.Reload();
                ResetFormUpdate();
            }
            catch (Exception ex)
            {
                ExtNet.Msg.Alert("Thông báo từ hệ thống", "Có lỗi xảy ra: " + ex.Message).Show();
            }
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnEdit_Click(object sender, DirectEventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(hdfId.Text))
                {
                    return;
                }
                // get dynamic column
                var colDynamic = SalaryBoardDynamicColumnController.GetById(Convert.ToInt32(hdfId.Text));
                if (colDynamic != null)
                {
                    txtFullName.Text           = colDynamic.FullName;
                    txtEmployeeCode.Text       = colDynamic.EmployeeCode;
                    txtUpdateColumnCode.Text   = colDynamic.ColumnCode;
                    txtUpdateColumnExcel.Text  = colDynamic.ColumnExcel;
                    chk_IsInUsedUpdate.Checked = colDynamic.IsInUsed;
                    txtUpdateValue.Text        = colDynamic.Value;
                    txtUpdateDisplay.Text      = colDynamic.Display;
                }

                wdUpdateColumnDynamic.Show();
            }
            catch (Exception ex)
            {
                Dialog.ShowError(ex.Message);
            }
        }