Пример #1
0
 protected void btnSuDungMaNhanVien_Click(object sender, DirectEventArgs e)
 {
     try
     {
         string str = "";
         if (e.ExtraParams["SelectedEmployees"] != "")
         {
             foreach (var item in SingleGridPanel1.GetSelectedRecordIDs())
             {
                 str += item + ",";
             }
             if (!string.IsNullOrEmpty(str))
             {
                 str = "," + str;
             }
             DataController.DataHandler.GetInstance().ExecuteNonQuery("ChamCong_SuDungMaCanBoLamMaChamCong", "@maCbStr", "@maDonVi", str, "");
         }
         else
         {
             DataController.DataHandler.GetInstance().ExecuteNonQuery("ChamCong_SuDungMaCanBoLamMaChamCong", "@maCbStr", "@maDonVi", str, "," + hdfStringMaDonVi.Text + ",");
         }
         SingleGridPanel1.GetGridPanel().Reload();
         wdSuDungMaNhanVien.Hide();
     }
     catch (Exception ex)
     {
         X.MessageBox.Alert("Có lỗi xảy ra", ex.Message).Show();
     }
 }
Пример #2
0
 protected void btnSuaDongYClick(object sender, DirectEventArgs e)
 {
     try
     {
         //if (SingleGridPanel1.GetSelectedRecordIDs().Count() > 1)
         //{
         //    X.MessageBox.Alert("Cảnh báo", "Bạn chỉ có thể chọn một nhân viên !").Show();
         //    return;
         //}
         //  Regex myRegex = new Regex("/[0-9A-Za-z\;]/");
         //myRegex.IsMatch(preg_match("/^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$/", "fsdfsd");
         if (txtSua.Text.LastIndexOf(';') == txtSua.Text.Length - 1)
         {
             txtSua.Text = txtSua.Text.Remove(txtSua.Text.LastIndexOf(';'));
         }
         foreach (var item in SingleGridPanel1.GetSelectedRecordIDs())
         {
             new HoSoController().UpdateMaChamCong(item, txtSua.Text);
         }
         Dialog.ShowNotification("Thông báo", "Cập nhật thành công !");
         SingleGridPanel1.GetGridPanel().Reload();
         wdSua.Hide();
     }
     catch (Exception ex)
     {
         X.MessageBox.Alert("Có lỗi xảy ra", ex.Message).Show();
     }
 }
Пример #3
0
 protected void btnImport_Click(object sender, DirectEventArgs e)
 {
     try
     {
         ImportFromExcelFile();
         wdImportExcelFile.Hide();
         SingleGridPanel1.GetGridPanel().Reload();
     }
     catch (Exception ex)
     {
         X.Msg.Alert("Thông báo từ hệ thống", ex.Message).Show();
     }
 }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Ext.Net.X.IsAjaxRequest)
     {
         SingleGridPanel1.GetAddButton().Hidden    = true;
         SingleGridPanel1.GetDeleteButton().Hidden = true;
         SingleGridPanel1.GetToolBar().Insert(1, btnImportFromExcel);
         SingleGridPanel1.GetToolBar().Insert(2, btnThietLapNhanh);
         SingleGridPanel1.GetToolBar().Insert(2, btnExportToExcel);
         SingleGridPanel1.GetEditButton().Listeners.Click.Handler = "return CheckSua();";
         SingleGridPanel1.GetGridPanel().Listeners.RowDblClick.Handler = "wdSua.show();";
         SingleGridPanel1.GetGridPanel().Listeners.RowContextMenu.Handler = "e.preventDefault(); #{RowContextMenu}.dataRecord = this.store.getAt(rowIndex);#{RowContextMenu}.showAt(e.getXY());SingleGridPanel1_GridPanel1.getSelectionModel().selectRow(rowIndex);";
         LoadDonVi();
     }
 }