private void notifyIconPartWarning_DoubleClick(object sender, EventArgs e) { if (Global.DepartmentID == 6) { frmPartWarning frm = new frmPartWarning(); frm.WindowState = FormWindowState.Maximized; TextUtils.OpenForm(frm); } }
private void btnImportExcel_Click(object sender, EventArgs e) { frmQuotationDetailImport frm = new frmQuotationDetailImport(); //frm.QuotationID = Quotation.ID; frm.Quotation = Quotation; frm.LoadDataChange += main_LoadDataChange; TextUtils.OpenForm(frm); }
private void xemDanhSachSanPhâmChưaVâtTưToolStripMenuItem_Click(object sender, EventArgs e) { string code = TextUtils.ToString(grvData.GetFocusedRowCellValue(colCode)); string name = TextUtils.ToString(grvData.GetFocusedRowCellValue(colName)); frmModelContained frm = new frmModelContained(); frm.MaterialCode = code; frm.MaterialName = name; TextUtils.OpenForm(frm); }
private void xemDanhSachNhaCungCâpToolStripMenuItem_Click(object sender, EventArgs e) { string code = grvData.GetFocusedRowCellValue(colCode).ToString(); string name = grvData.GetFocusedRowCellValue(colName).ToString(); frmSupplierMaterial frm = new frmSupplierMaterial(); frm.MaterialCode = code; frm.MaterialName = name; TextUtils.OpenForm(frm); }
void sendMail() { if (ErrorModel.DepartmentID == 1)//Phong TK { //ModulesModel product = (ModulesModel)ModulesBO.Instance.FindByAttribute("Code", cboModule.EditValue.ToString())[0]; ModulesModel product = (ModulesModel)ModulesBO.Instance.FindByPK(TextUtils.ToInt(cboModule.EditValue)); string productCode = product.Code; List <string> listEmail = getListMail(productCode); #region Mở outlook int count = Process.GetProcesses().Where(o => o.ProcessName.Contains("OUTLOOK")).Count(); if (count == 0) { try { Process.Start("outlook.exe"); } catch (Exception) { } } #endregion Mở outlook string subject = string.Format("ERROR REPORT - {0} - {1}", ErrorModel.Code, productCode); string content = "Mã lỗi: <b>" + ErrorModel.Code + "</b><br>" + "Mã dự án: <b>" + cboProject.EditValue.ToString() + "<b><br>" + "Mã sản phẩm: <b>" + productCode + "<b><br>" + "Tên sản phẩm: <b>" + product.Name + "<b><br>" + "Mô tả lỗi: " + ErrorModel.Description + "<br>" + "Hình ảnh lỗi: <a>" + ErrorModel.FolderPathError + "</a>" + "<br>" + "Danh sách nhân viên thiết kế: " + "<br>" + "Thiết kế cơ khí: " + NVCoKhi + "<br>" + "Thiết kế điện: " + NVDien + "<br>" + "Thiết kế điện tử: " + NVDT ; string to = ""; foreach (string item in listEmail) { to += item.ToLower() + ";"; } frmSendEmailAttach frm = new frmSendEmailAttach(); frm.Subject = subject; frm.CC = "*****@*****.**"; frm.To = to; frm.Content = content; TextUtils.OpenForm(frm); //bool success = TextUtils.SetEmailSend(subject, content, to.Substring(0, to.Length - 1), "*****@*****.**"); //if (!success) //{ // TextUtils.SetEmailSend(subject, content, "*****@*****.**", ""); //} } }
private void popupNotifier1_Click(object sender, EventArgs e) { frmMainVatTu frm = new frmMainVatTu(); frm.WindowState = FormWindowState.Maximized; TextUtils.OpenForm(frm); if (popupNotifier1.ContentText == "Bạn đã ghi nhật ký công việc chưa! Nếu chưa thì ghi vào nhật ký đi nhé") { System.Diagnostics.Process.Start(@"\\server\data2\Thietke\ISO\ISO.Thietke\Nhat ky CV\Nam 2014\"); } }
private void xemChiTiếtGiáModuleToolStripMenuItem_Click(object sender, EventArgs e) { string moduleCode = grvModule.GetFocusedRowCellValue(colMCode).ToString(); if (moduleCode.StartsWith("TPAD.")) { frmModulePrice frm = new frmModulePrice(); ModulesModel model = (ModulesModel)ModulesBO.Instance.FindByAttribute("Code", moduleCode)[0]; frm.Module = model; TextUtils.OpenForm(frm); } }
private void btnShowPrice_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } BaiThucHanhModel model = (BaiThucHanhModel)BaiThucHanhBO.Instance.FindByPK(id); frmBaiThucHanhPrice frm = new frmBaiThucHanhPrice(); frm.BaiThucHanh = model; TextUtils.OpenForm(frm); }
private void btnImportExcel_Click(object sender, EventArgs e) { if (treeData.AllNodesCount > 0) { MessageBox.Show("Báo giá đã được thêm từ Excel.", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } frmQuotationDetailImportSX frm = new frmQuotationDetailImportSX(); frm.Quotation = Quotation; //frm.QuotationID = Quotation.ID; frm.LoadDataChange += main_LoadDataChange; TextUtils.OpenForm(frm); }
private void btnModuleHistory_Click(object sender, EventArgs e) { int iD = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (iD == 0) { return; } frmFilmHistory frm = new frmFilmHistory(); frm.ModuleFilmID = iD; frm.ModuleFilmCode = grvData.GetFocusedRowCellValue(colCode).ToString(); TextUtils.OpenForm(frm); }
private void btnTester_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //Form1 frm = new Form1(); //frm.Show(); //if (Global.AppUserName.ToLower() == "thao.nv") //{ Form2 frm = new Form2(); TextUtils.OpenForm(frm); //} //if (Global.AppUserName.ToLower() == "hien.nt") //{ //} }
private void btnTongHopChiPhi_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); BaoGiaModel model = (BaoGiaModel)BaoGiaBO.Instance.FindByPK(id); //frmBaoGiaCost frm = new frmBaoGiaCost(); //frm.BaoGia = model; //frm.LoadDataChange += main_LoadDataChange; //TextUtils.OpenForm(frm); frmBaoGiaCostModule frm = new frmBaoGiaCostModule(); frm.BaoGia = model; TextUtils.OpenForm(frm); }
private void xemDanhSáchCácPhiênBảnToolStripMenuItem_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } ProductsModel product = (ProductsModel)ProductsBO.Instance.FindByPK(id); frmShowListVersion frm = new frmShowListVersion(); frm.Product = product; TextUtils.OpenForm(frm); }
private void xemGiáToolStripMenuItem_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } ProductsModel model = (ProductsModel)ProductsBO.Instance.FindByPK(id); frmProductPrice frm = new frmProductPrice(); frm.Product = model; TextUtils.OpenForm(frm); }
private void btnMaterial_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { using (WaitDialogForm fWait = new WaitDialogForm("Vui lòng chờ trong giây lát...", "Đang load dữ liệu cho vật tư!")) { try { //TextUtils.ExcuteProcedure("spDongBoMaterialQLSX_1", null, null);//update gía //TextUtils.ExcuteProcedure("spDongBoMaterialQLSX", null, null);//update số ngày giao dịch, ngày giao dịch gần nhất } catch (Exception) { } frmMaterialManagement frm = new frmMaterialManagement(); TextUtils.OpenForm(frm); } }
private void btnAdd_Click(object sender, EventArgs e) { if (grvData.RowCount == 0) { MessageBox.Show("Nhóm vật tư không có thông số!", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } int id = TextUtils.ToInt(grvGroup.GetFocusedRowCellValue(colGroupID)); if (id == 0) { return; } MaterialNSModel model = (MaterialNSModel)MaterialNSBO.Instance.FindByPK(id); frmCreateVTNS frm = new frmCreateVTNS(); frm.MaterialNS = model; TextUtils.OpenForm(frm); }
private void btnExport_Click(object sender, EventArgs e) { string folderPath = ""; FolderBrowserDialog fbd = new FolderBrowserDialog(); if (fbd.ShowDialog() == DialogResult.OK) { folderPath = fbd.SelectedPath; } else { return; } string fullName = TextUtils.ToString(grvCboUser.GetFocusedRowCellValue(colFullName)); TextUtils.ExportExcel(grvData, folderPath, fullName, false); string filepath = folderPath + "//" + fullName + ".xls"; DataTable dtFile = new DataTable(); dtFile.Columns.Add("ID"); dtFile.Columns.Add("FileName"); dtFile.Columns.Add("Path"); dtFile.Rows.Add(0, Path.GetFileName(filepath), filepath); string content = " Dear " + fullName + "!<br>" + "Phòng dự án gửi anh/chị các vấn đề mà anh/chị phụ trách.<br> Đề nghị anh/chị thực hiện theo đúng kế hoạch.<br>Xin chân thành cảm ơn."; string subject = "VẤN ĐỀ TỒN ĐỌNG DỰ ÁN"; frmSendEmailAttach frm = new frmSendEmailAttach(); frm.To = TextUtils.ToString(grvCboUser.GetFocusedRowCellValue(colAccount)) + "@tpa.com.vn"; frm.Content = content; frm.Subject = subject; frm.dtFile = dtFile; frm.IsClosed = true; frm.CC = "[email protected];[email protected];[email protected];[email protected];[email protected]"; TextUtils.OpenForm(frm); }
private void btnPartBorrow_Click(object sender, EventArgs e) { frmPartBorrowManager frm = new frmPartBorrowManager(); TextUtils.OpenForm(frm); }
private void btnShowEquipment_Click(object sender, EventArgs e) { frmShowEquipment frm = new frmShowEquipment(); TextUtils.OpenForm(frm); }
private void btnErrorReport_Click(object sender, EventArgs e) { frmErrorReport frm = new frmErrorReport(); TextUtils.OpenForm(frm); }
private void btnCaseManagement_Click(object sender, EventArgs e) { frmVoucherDebtManagement frm = new frmVoucherDebtManagement(); TextUtils.OpenForm(frm); }
private void btnProjectProblemManager_Click(object sender, EventArgs e) { frmProjectProblemManager frm = new frmProjectProblemManager(); TextUtils.OpenForm(frm); }
private void tạoCấuTrúcGiảiPhápToolStripMenuItem_Click(object sender, EventArgs e) { frmSolutionCTTM frm = new frmSolutionCTTM(); TextUtils.OpenForm(frm); }
private void yÊUCẦUVẬTTƯToolStripMenuItem_Click(object sender, EventArgs e) { frmYCVTmanager frm = new frmYCVTmanager(); TextUtils.OpenForm(frm); }
private void btnForm1_Click(object sender, EventArgs e) { Form1 frm = new Form1(); TextUtils.OpenForm(frm); }
private void btnTestGridBackground_Click(object sender, EventArgs e) { frmBackgroundGrid frm = new frmBackgroundGrid(); TextUtils.OpenForm(frm); }
private void btnErrorExcel_Click(object sender, EventArgs e) { frmErrorExcel frm = new frmErrorExcel(); TextUtils.OpenForm(frm); }
private void đỀNGHỊNHẬPKHOToolStripMenuItem_Click(object sender, EventArgs e) { frmImportRequrieManager frm = new frmImportRequrieManager(); TextUtils.OpenForm(frm); }
private void btnBaoGia_Click(object sender, EventArgs e) { frmBaoGia frm = new frmBaoGia(); TextUtils.OpenForm(frm); }
private void vẬTTƯHÀNGHÓAToolStripMenuItem_Click(object sender, EventArgs e) { frmMaterialManagerQLSX frm = new frmMaterialManagerQLSX(); TextUtils.OpenForm(frm); }