private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Post-Followup-Modify") == false) { MessageBox.Show("You don't have Rights to Post-Followup-Modify"); return; } //bar1.Visible = false; if (grdViewCall.FocusedRowHandle >= 0) { int iEntryId = 0; iEntryId = Convert.ToInt32(grdViewCall.GetFocusedRowCellValue("EntryId").ToString()); frmFollowUp frm = new frmFollowUp() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; if (BsfGlobal.g_bWorkFlow == true) { m_oGridMasterView = grdViewCall; m_oGridMasterView.FocusedRowHandle = grdViewCall.FocusedRowHandle; BsfGlobal.g_bTrans = true; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frm, "Post-FollowUp Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frm); frm.Execute(iEntryId, "E"); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { iEntryId = Convert.ToInt32(grdViewCall.GetFocusedRowCellValue("EntryId").ToString()); CommFun.DW1.Hide(); frm = new frmFollowUp(); CommFun.DW2.Text = "Post-FollowUp Entry"; frm.TopLevel = false; CommFun.RP2.Controls.Clear(); frm.FormBorderStyle = FormBorderStyle.None; frm.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frm); frm.Execute(iEntryId, "E"); CommFun.DW2.Show(); //Cursor.Current = Cursors.WaitCursor; //panelControl1.Controls.Clear(); //panelControl1.Controls.Add(frm); //frm.Execute(iEntryId,"E"); //Cursor.Current = Cursors.Default; } } }
private void EditVendor() { if (BsfGlobal.FindPermission("Vendor-Master-Edit") == false) { MessageBox.Show("No Rights to Vendor-Master-Edit"); return; } if (VendorView.FocusedRowHandle < 0) { return; } int iVendorId = Convert.ToInt32(VendorView.GetRowCellValue(VendorView.FocusedRowHandle, "VendorId").ToString()); VendorName = VendorView.GetFocusedRowCellValue("VendorName").ToString(); int i = VendorView.RowCount - 1; if (BsfGlobal.g_bWorkFlow == true) { //try { this.Parent.Controls.Owner.Hide(); } //catch { } m_oGridMasterView = VendorView; m_oGridMasterView.FocusedRowHandle = VendorView.FocusedRowHandle; iRowId = VendorView.FocusedRowHandle; BsfGlobal.g_bWorkFlow = true; frmMain frm = new frmMain(); frm.m_lVendorId = iVendorId; frm.m_sVendorName = VendorName; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); DevExpress.XtraEditors.PanelControl oPanel = new DevExpress.XtraEditors.PanelControl(); oPanel = BsfGlobal.GetPanel(frm, "Vendor Details"); if (oPanel != null) { oPanel.Controls.Clear(); frm.TopLevel = false; frm.FormBorderStyle = FormBorderStyle.None; frm.Dock = DockStyle.Fill; oPanel.Controls.Add(frm); frm.Execute(); oPanel.Visible = true; Cursor.Current = Cursors.Default; } } else { Cursor.Current = Cursors.WaitCursor; frmMain frm = new frmMain(); frm.m_lVendorId = iVendorId; frm.m_sVendorName = VendorName; frm.Execute(); Cursor.Current = Cursors.Default; } m_bAdd = true; m_iRowId = VendorView.FocusedRowHandle; }
private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Buyer-Receipt-Cash-Edit") == false) { MessageBox.Show("You don't have Rights to Buyer-Receipt-Cash-Edit"); return; } if (grdCashView.FocusedRowHandle >= 0) { int RegId = 0; RegId = Convert.ToInt32(grdCashView.GetFocusedRowCellValue("CashReceiptId").ToString()); string sType = grdCashView.GetFocusedRowCellValue("Type").ToString(); frmCashEntry frmCashEntry = new frmCashEntry() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; if (BsfGlobal.g_bWorkFlow == true) { m_oGridMasterView = grdCashView; grdCashView.FocusedRowHandle = grdCashView.FocusedRowHandle; BsfGlobal.g_bTrans = true; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frmCashEntry, "Cash Receipt Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frmCashEntry); frmCashEntry.Execute(RegId, sType); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { RegId = Convert.ToInt32(grdCashView.GetFocusedRowCellValue("CashReceiptId").ToString()); CommFun.DW1.Hide(); frmCashEntry frmCompEntry = new frmCashEntry(); CommFun.DW2.Text = " Cash Receipt Entry"; frmCompEntry.TopLevel = false; CommFun.RP2.Controls.Clear(); frmCompEntry.FormBorderStyle = FormBorderStyle.None; frmCompEntry.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frmCompEntry); frmCompEntry.Execute(RegId, sType); CommFun.DW2.Show(); } } Close(); }
private void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("RentRegister-Add") == false) { MessageBox.Show("You don't have Rights to RentRegister-Add", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } frmRentEntry frmCompEntry = new frmRentEntry(); if (BsfGlobal.g_bWorkFlow == true) { //BsfGlobal.g_bTrans = true; //BsfGlobal.g_oWindow.Hide(); //frmCompEntry.Panel = BsfGlobal.g_oPanelTrans; //BsfGlobal.g_oPanelTrans.Controls.Clear(); //BsfGlobal.g_oWindowTrans.Text = "Rent Entry"; //BsfGlobal.g_oPanelTrans.Controls.Add(frmCompEntry); BsfGlobal.g_bTrans = true; oPanel = BsfGlobal.GetPanel(frmCompEntry, "Rent Details"); if (oPanel != null) { oPanel.Controls.Clear(); frmCompEntry.TopLevel = false; frmCompEntry.FormBorderStyle = FormBorderStyle.None; frmCompEntry.Dock = DockStyle.Fill; oPanel.Controls.Add(frmCompEntry); //frmflatDet.Execute(m_iRevId); oPanel.Visible = true; Cursor.Current = Cursors.Default; } } else { //Radpanel.Controls.Clear(); //frmCompEntry.Radpanel = Radpanel; //frmCompEntry.TopLevel = false; //frmCompEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; //frmCompEntry.Dock = DockStyle.Fill; //Radpanel.Controls.Add(frmCompEntry); //CommFun.DW1.Text = "Check List"; // radPanel1.Controls.Clear(); //frmCheckListEntry frmCompEntry = new frmCheckListEntry(); frmCompEntry.TopLevel = false; // frmCompEntry.FormBorderStyle = Alias.FormBorderStyle.None; frmCompEntry.Dock = DockStyle.Fill; // radPanel1.Controls.Add(frmCompEntry); frmCompEntry.Show(); } frmCompEntry.Show(); }
private void btnAdd_ItemClick(object sender, ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Pre-Followup-Add") == false) { MessageBox.Show("You don't have Rights to Pre-Followup-Add"); return; } frmCallsheetEntry frmCsEntry = new frmCallsheetEntry(); //Radpanel.Controls.Clear(); frmCsEntry.TopLevel = false; frmCsEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; if (BsfGlobal.g_bWorkFlow == true) { BsfGlobal.g_bTrans = true; oPanel = BsfGlobal.GetPanel(frmCsEntry, "Followup Entry"); if (oPanel != null) { oPanel.Controls.Clear(); frmCsEntry.TopLevel = false; frmCsEntry.FormBorderStyle = FormBorderStyle.None; frmCsEntry.Dock = DockStyle.Fill; oPanel.Controls.Add(frmCsEntry); frmCsEntry.Execute("A", 0, "CallReg"); oPanel.Visible = true; Cursor.Current = Cursors.Default; } } else { CommFun.RP1.Controls.Clear(); frmCsEntry.Radpanel = CommFun.RP1; frmCsEntry.TopLevel = false; frmCsEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmCsEntry.Dock = DockStyle.Fill; CommFun.RP1.Controls.Add(frmCsEntry); frmCsEntry.Execute("A", 0, "CallReg"); FillExecreg(); } }
private void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("ComplaintRegister-Add") == false) { MessageBox.Show("You don't have Rights to ComplaintRegister-Add", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } //Radpanel.Controls.Clear(); frmComplaintEntry frmCompEntry = new frmComplaintEntry(); if (BsfGlobal.g_bWorkFlow == true) { BsfGlobal.g_bTrans = true; oPanel = BsfGlobal.GetPanel(frmCompEntry, "Complaint Entry"); if (oPanel != null) { oPanel.Controls.Clear(); frmCompEntry.TopLevel = false; frmCompEntry.FormBorderStyle = FormBorderStyle.None; frmCompEntry.Dock = DockStyle.Fill; oPanel.Controls.Add(frmCompEntry); //frmBr.Execute("E", iAdvRegId, sApprve); oPanel.Visible = true; Cursor.Current = Cursors.Default; } } else { Radpanel.Controls.Clear(); frmCompEntry.Radpanel = Radpanel; frmCompEntry.TopLevel = false; frmCompEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmCompEntry.Dock = DockStyle.Fill; Radpanel.Controls.Add(frmCompEntry); } frmCompEntry.Show(); }
private void toolStripVAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Vendor-Master-Add") == false) { MessageBox.Show("No Rights to Vendor-Master-Add"); return; } if (BsfGlobal.g_bWorkFlow == true) { try { this.Parent.Controls.Owner.Hide(); } catch { } BsfGlobal.g_bWorkFlow = true; frmMain frm = new frmMain(); DevExpress.XtraEditors.PanelControl oPanel = new DevExpress.XtraEditors.PanelControl(); oPanel = BsfGlobal.GetPanel(frm, "Vendor Details"); if (oPanel != null) { oPanel.Controls.Clear(); iRowId = 0; frm.TopLevel = false; frm.FormBorderStyle = FormBorderStyle.None; frm.Dock = DockStyle.Fill; oPanel.Controls.Add(frm); frm.m_lVendorId = 0; frm.m_sVendorName = ""; frm.Execute(); oPanel.Visible = true; Cursor.Current = Cursors.Default; } //Cursor.Current = Cursors.WaitCursor; //BsfGlobal.g_bTrans = true; //BsfGlobal.g_oWindow.Hide(); //frmMain frm = new frmMain(); //BsfGlobal.g_oPanelTrans.Controls.Clear(); //BsfGlobal.g_oWindowTrans.Text = "Vendor Details"; //frm.TopLevel = false; //frm.FormBorderStyle = FormBorderStyle.None; //frm.Dock = DockStyle.Fill; //BsfGlobal.g_oPanelTrans.Controls.Add(frm); //frm.Execute(0); //BsfGlobal.g_oWindowTrans.Show(); //Cursor.Current = Cursors.Default; } else { Cursor.Current = Cursors.WaitCursor; frmMain frm = new frmMain(); frm.m_lVendorId = 0; frm.m_sVendorName = ""; frm.Execute(); Cursor.Current = Cursors.Default; PopulateVendor(); } m_bAdd = true; m_iRowId = 0; }
private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Buyer-Receipt-Edit") == false) { MessageBox.Show("You don't have Rights to Buyer-Receipt-Edit"); return; } DataView dvData; //bar1.Visible = true; if (grdViewReceipt.FocusedRowHandle >= 0) { dvData = new DataView(dt) { RowFilter = String.Format("ReceiptId={0}", Convert.ToInt32(grdViewReceipt.GetFocusedRowCellValue("ReceiptId").ToString())) }; int BuyerId = Convert.ToInt32(grdViewReceipt.GetFocusedRowCellValue("ReceiptId").ToString()); //string Approve = CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "Approve"), CommFun.datatypes.vartypestring).ToString(); //if (Approve != "Partial" && Approve != "Yes") //{ // string sUserName = BsfGlobal.CheckEntryUsed("Buyer-Receipt-Edit", BuyerId, BsfGlobal.g_sCRMDBName); // if (sUserName != "") // { // string sMsg = "The Entry is already Used by " + sUserName; // sMsg = sMsg + ", Do not Edit"; // MessageBox.Show(sMsg); // return; // } //} //int CCId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("CostCentreId").ToString()); frmPMSReceiptEntry frmCompEntry = new frmPMSReceiptEntry() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; if (BsfGlobal.g_bWorkFlow == true) { m_oGridMasterView = grdViewReceipt; m_oGridMasterView.FocusedRowHandle = grdViewReceipt.FocusedRowHandle; m_iFocusRowId = grdViewReceipt.FocusedRowHandle; BsfGlobal.g_bTrans = true; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frmCompEntry, "PMS Receipt Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frmCompEntry); frmCompEntry.i_RowId = m_iFocusRowId; frmCompEntry.Execute(BuyerId, "E"); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { m_oGridMasterView = grdViewReceipt; m_oGridMasterView.FocusedRowHandle = grdViewReceipt.FocusedRowHandle; m_iFocusRowId = grdViewReceipt.FocusedRowHandle; //PBRegId = Convert.ToInt32(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle,"ReceiptId")); CommFun.DW1.Hide(); //frmReceiptEntry frmCompEntry = new frmReceiptEntry(); CommFun.DW2.Text = "PMS Receipt Entry"; frmCompEntry.TopLevel = false; CommFun.RP2.Controls.Clear(); frmCompEntry.FormBorderStyle = FormBorderStyle.None; frmCompEntry.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frmCompEntry); frmCompEntry.i_RowId = m_iFocusRowId; frmCompEntry.Execute(BuyerId, "E"); CommFun.DW2.Show(); } } }
private void btnEdit_ItemClick(object sender, ItemClickEventArgs e) { if (DGvTransView.FocusedRowHandle < 0) { return; } if (BsfGlobal.FindPermission("CRM-ServiceBill-Edit") == false) { MessageBox.Show("You don't have Rights to Service Quote Bill-Modify", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } //bar1.Visible = false; if (DGvTransView.FocusedRowHandle >= 0) { int argWORegId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("RegBillId").ToString()); string Approve = CommFun.IsNullCheck(DGvTransView.GetRowCellValue(DGvTransView.FocusedRowHandle, "Approve"), CommFun.datatypes.vartypestring).ToString(); if (Approve != "Partial" && Approve != "Yes") { string sUserName = BsfGlobal.CheckEntryUsed("CRM-ServiceBill-Edit", argWORegId, BsfGlobal.g_sCRMDBName); if (sUserName != "") { string sMsg = "The Entry is already Used by " + sUserName; sMsg = sMsg + ", Do not Edit"; MessageBox.Show(sMsg); return; } } frmServiceOrderBill frmProg = new frmServiceOrderBill() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; if (BsfGlobal.g_bWorkFlow == true) { m_oGridMasterView = DGvTransView; m_oGridMasterView.FocusedRowHandle = DGvTransView.FocusedRowHandle; BsfGlobal.g_bTrans = true; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frmProg, "Service Order Bill"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frmProg); frmProg.Execute(argWORegId); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { argWORegId = Convert.ToInt32(DGvTransView.GetRowCellValue(DGvTransView.FocusedRowHandle, "RegBillId")); CommFun.DW1.Hide(); frmProg = new frmServiceOrderBill(); CommFun.DW2.Text = "Service Order Bill"; frmProg.TopLevel = false; CommFun.RP2.Controls.Clear(); frmProg.FormBorderStyle = FormBorderStyle.None; frmProg.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frmProg); frmProg.Execute(argWORegId); CommFun.DW2.Show(); } //if (BsfGlobal.g_bWorkFlow == true) //{ // BsfGlobal.g_bTrans = true; // m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; // m_oDW.Hide(); // BsfGlobal.g_bTrans = false; // Cursor.Current = Cursors.WaitCursor; // PanelControl oPanel = new PanelControl(); // oPanel = BsfGlobal.GetPanel(frmService, "Service Order Bill"); // if ((oPanel == null)) // return; // oPanel.Controls.Clear(); // oPanel.Controls.Add(frmService); // frmService.Execute(argWORegId); // oPanel.Visible = true; // Cursor.Current = Cursors.Default; //} //else //{ // Cursor.Current = Cursors.WaitCursor; // panelControl1.Controls.Clear(); // panelControl1.Controls.Add(frmService); // frmService.Execute(argWORegId); // Cursor.Current = Cursors.Default; //} } }
private void barButtonItem3_ItemClick(object sender, ItemClickEventArgs e) { if (BsfGlobal.g_bWorkFlowDialog == true) { return; } if (grdPBTransView.FocusedRowHandle >= 0) { if (BsfGlobal.FindPermission("Progress Bill-Modify") == false) { MessageBox.Show("You don't have Rights to Progress Bill-Modify"); return; } int PBRegId = 0; PBRegId = Convert.ToInt32(grdPBTransView.GetFocusedRowCellValue("PBillId").ToString()); int CCId = Convert.ToInt32(grdPBTransView.GetFocusedRowCellValue("CostCentreId").ToString()); string sApprove = CommFun.IsNullCheck(grdPBTransView.GetFocusedRowCellValue("Approve"), CommFun.datatypes.vartypestring).ToString(); frmProgressBill frmProg = new frmProgressBill() { FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, TopLevel = false, Dock = DockStyle.Fill }; if (BsfGlobal.g_bWorkFlow == true) { frmProg.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmProg.TopLevel = false; frmProg.Dock = DockStyle.Fill; BsfGlobal.g_bTrans = true; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; frmProgressBill frm = new frmProgressBill(); DevExpress.XtraEditors.PanelControl oPanel = new DevExpress.XtraEditors.PanelControl(); oPanel = BsfGlobal.GetPanel(frm, "Progress Bill Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); frm.TopLevel = false; frm.FormBorderStyle = FormBorderStyle.None; frm.Dock = DockStyle.Fill; oPanel.Controls.Add(frm); frm.Execute(PBRegId, CCId, "E", sApprove); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { PBRegId = Convert.ToInt32(grdPBTransView.GetFocusedRowCellValue("PBillId").ToString()); frmProg = new frmProgressBill(); CommFun.DW1.Hide(); CommFun.DW2.Text = "ProgressBill Entry"; frmProg.TopLevel = false; CommFun.RP2.Controls.Clear(); frmProg.FormBorderStyle = FormBorderStyle.None; frmProg.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frmProg); frmProg.Execute(PBRegId, CCId, "E", sApprove); CommFun.DW2.Show(); //frmProg.Radpanel = Radpanel; //Radpanel.Controls.Clear(); //Radpanel.Controls.Add(frmProg); //frmProg.Execute(PBRegId, CCId, "E", sApprove); } } }
private void btnEdit_ItemClick(object sender, ItemClickEventArgs e) { //bar1.Visible = false; DataView dvData; if (BsfGlobal.FindPermission("Pre-Followup-Modify") == false) { MessageBox.Show("You don't have Rights to Pre-Followup-Modify"); return; } if (BsfGlobal.g_bWorkFlowDialog == true) { return; } if (grdCallSheetView.GetFocusedRow() == null) { return; } if (grdCallSheetView.FocusedRowHandle >= 0) { int entryId; bool bAns = false; if (BsfGlobal.g_bWorkFlowDialog == true) { return; } dvData = new DataView(dtCallSht) { RowFilter = String.Format("EntryId={0}", Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("EntryId"))) }; entryId = Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("EntryId")); string s = grdCallSheetView.GetFocusedRowCellValue("CallType").ToString(); bAns = CallSheetEntryBL.CallSheetFound(Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("LeadId")), entryId); frmCallsheetEntry frmCsEntry = new frmCallsheetEntry() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; if (bAns == false) { //UpdateChildren(frmCsEntry.groupControl1.Controls, true); //frmCsEntry.btnBroker.Enabled = false; //frmCsEntry.btnSave.Enabled = false; } else if (s == "Finalization") { //UpdateChildren(frmCsEntry.groupControl1.Controls, true); frmCsEntry.btnBroker.Enabled = true; frmCsEntry.btnSave.Enabled = true; frmBuyer frm = new frmBuyer(); //UpdateChildren(frm.groupControl1.Controls, true); frm.btnBroker.Enabled = true; frm.cboBroker.Enabled = true; frm.txtCommAmt.Enabled = true; frm.txtCommpercent.Enabled = true; frm.btnSave.Enabled = true; frm.btnCancel.Enabled = true; } //frmCsEntry.FillCallSheet = dtData; //frmCsEntry.TopLevel = false; //frmCsEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; //frmCsEntry.Dock = DockStyle.Fill; if (BsfGlobal.g_bWorkFlow == true) { m_oGridMasterView = grdCallSheetView; m_oGridMasterView.FocusedRowHandle = grdCallSheetView.FocusedRowHandle; m_iFocusRowId = grdCallSheetView.FocusedRowHandle; m_sTxtRemarks = txtRemarks; BsfGlobal.g_bTrans = true; m_oDW = (DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frmCsEntry, "Followup Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frmCsEntry); frmCsEntry.i_RowId = m_iFocusRowId; frmCsEntry.Execute("E", entryId, "CallReg"); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { m_oGridMasterView = grdCallSheetView; m_oGridMasterView.FocusedRowHandle = grdCallSheetView.FocusedRowHandle; m_iFocusRowId = grdCallSheetView.FocusedRowHandle; m_sTxtRemarks = txtRemarks; CommFun.DW1.Hide(); CommFun.DW2.Text = "FollowUp Entry"; frmCsEntry.TopLevel = false; CommFun.RP2.Controls.Clear(); frmCsEntry.FormBorderStyle = FormBorderStyle.None; frmCsEntry.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frmCsEntry); frmCsEntry.i_RowId = m_iFocusRowId; frmCsEntry.Execute("E", entryId, "CallReg"); CommFun.DW2.Show(); } } }
private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.g_bWorkFlowDialog == true) { return; } if (grdLeadRegView.GetFocusedRow() == null) { return; } if (grdLeadRegView.FocusedRowHandle >= 0) { int LeadId; bool bAns = false; if (BsfGlobal.g_bWorkFlowDialog == true) { return; } //dvData = new DataView(dtCallSht) { RowFilter = String.Format("EntryId={0}", Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("EntryId").ToString())) }; LeadId = Convert.ToInt32(grdLeadRegView.GetFocusedRowCellValue("LeadId")); //string s = grdCallSheetView.GetFocusedRowCellValue("CallType").ToString(); //bAns = CallSheetEntryBL.CallSheetFound(Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("LeadId")), entryId); frmNewLead frm = new frmNewLead() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; //if (bAns == false) //{ // //UpdateChildren(frmCsEntry.groupControl1.Controls, true); // //frmCsEntry.btnBroker.Enabled = false; // //frmCsEntry.btnSave.Enabled = false; //} //else if (s == "Finalization") //{ // //UpdateChildren(frmCsEntry.groupControl1.Controls, true); // frmCsEntry.btnBroker.Enabled = true; // frmCsEntry.btnSave.Enabled = true; // frmBuyer frm = new frmBuyer(); // //UpdateChildren(frm.groupControl1.Controls, true); // frm.btnBroker.Enabled = true; // frm.cboBroker.Enabled = true; // frm.txtCAmt.Enabled = true; // frm.txtCommpercent.Enabled = true; // frm.btnSave.Enabled = true; // frm.btnCancel.Enabled = true; //} ////frmCsEntry.FillCallSheet = dtData; ////frmCsEntry.TopLevel = false; ////frmCsEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; ////frmCsEntry.Dock = DockStyle.Fill; if (BsfGlobal.g_bWorkFlow == true) { m_oGridMasterView = grdLeadRegView; m_oGridMasterView.FocusedRowHandle = grdLeadRegView.FocusedRowHandle; m_iFocusRowId = grdLeadRegView.FocusedRowHandle; BsfGlobal.g_bTrans = true; m_oDW = (DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frm, "Lead Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frm); frm.i_RowId = m_iFocusRowId; frm.Execute(LeadId); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { m_oGridMasterView = grdLeadRegView; m_oGridMasterView.FocusedRowHandle = grdLeadRegView.FocusedRowHandle; m_iFocusRowId = grdLeadRegView.FocusedRowHandle; CommFun.DW1.Hide(); CommFun.DW2.Text = "Lead Entry"; frm.TopLevel = false; CommFun.RP2.Controls.Clear(); frm.FormBorderStyle = FormBorderStyle.None; frm.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frm); frm.i_RowId = m_iFocusRowId; frm.Execute(LeadId); CommFun.DW2.Show(); } } }
private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Pre-Followup-Modify") == false) { MessageBox.Show("You don't have Rights to Pre-Followup-Modify"); return; } if (BsfGlobal.g_bWorkFlowDialog == true) { return; } if (grdTargetRegView.GetFocusedRow() == null) { return; } if (grdTargetRegView.FocusedRowHandle >= 0) { int iEntryId; if (BsfGlobal.g_bWorkFlowDialog == true) { return; } iEntryId = Convert.ToInt32(grdTargetRegView.GetFocusedRowCellValue("TargetId")); frmExecTarget frm = new frmExecTarget() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; if (BsfGlobal.g_bWorkFlow == true) { m_oGridMasterView = grdTargetRegView; m_oGridMasterView.FocusedRowHandle = grdTargetRegView.FocusedRowHandle; m_iFocusRowId = grdTargetRegView.FocusedRowHandle; BsfGlobal.g_bTrans = true; m_oDW = (DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frm, "Target Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frm); frm.i_RowId = m_iFocusRowId; frm.Execute(iEntryId); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { m_oGridMasterView = grdTargetRegView; m_oGridMasterView.FocusedRowHandle = grdTargetRegView.FocusedRowHandle; m_iFocusRowId = grdTargetRegView.FocusedRowHandle; CommFun.DW1.Hide(); CommFun.DW2.Text = "Target Entry"; frm.TopLevel = false; CommFun.RP2.Controls.Clear(); frm.FormBorderStyle = FormBorderStyle.None; frm.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frm); frm.i_RowId = m_iFocusRowId; frm.Execute(iEntryId); CommFun.DW2.Show(); } } }
private void barbtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Executive Target-Modify") == false) { MessageBox.Show("You don't have Rights to Executive Target-Modify"); return; } barTargetReg.Visible = false; if (grdTargetRegView.FocusedRowHandle >= 0) { int i_RegModeId = 0; s_RegMode = "E"; i_RegModeId = Convert.ToInt32(grdTargetRegView.GetFocusedRowCellValue("TargetId").ToString()); frmTargetEntry frm = new frmTargetEntry() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; if (BsfGlobal.g_bWorkFlow == true) { BsfGlobal.g_bTrans = true; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frm, "Executive Target Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frm); frm.Execute(s_RegMode, i_RegModeId, "Reg"); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { Cursor.Current = Cursors.WaitCursor; panelTargetReg.Controls.Clear(); panelTargetReg.Controls.Add(frm); frm.Execute(s_RegMode, i_RegModeId, "Reg"); Cursor.Current = Cursors.Default; } } //barTargetReg.Visible = false; //if (BsfGlobal.g_bWorkFlowDialog == true) // return; //frmTargetEntry frm = new frmTargetEntry(); //frm.TopLevel = false; //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; //frm.Dock = DockStyle.Fill; //if (BsfGlobal.g_bWorkFlow == true) //{ // BsfGlobal.g_bTrans = true; PanelControl oPanel = new PanelControl(); // //oPanel = BsfGlobal.GetPanel(frm, "Executive Target Entry"); // if (oPanel != null) // { // s_RegMode = "E"; // i_RegModeId = Convert.ToInt32(grdTargetRegView.GetFocusedRowCellValue("TargetId")); // BsfGlobal.g_bTrans = true; // m_oDW = (DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; // m_oDW.Hide(); // BsfGlobal.g_bTrans = false; // Cursor.Current = Cursors.WaitCursor; // //PanelControl oPanel = new PanelControl(); // oPanel = BsfGlobal.GetPanel(frm, "Executive Target Entry"); // if ((oPanel == null)) // return; // oPanel.Controls.Clear(); // oPanel.Controls.Add(frm); // frm.Execute(s_RegMode, i_RegModeId, "Reg"); // oPanel.Visible = true; // Cursor.Current = Cursors.Default; // } //} //else //{ // if (grdTargetRegView.FocusedRowHandle >= 0) // { // barTargetReg.Visible = false; // s_RegMode = "E"; // i_RegModeId = Convert.ToInt32(grdTargetRegView.GetFocusedRowCellValue("TargetId")); // panelTargetReg.Controls.Clear(); // frmTargetEntry frmTargetEnt = new frmTargetEntry() { TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill }; // frmTargetEnt.Execute(s_RegMode, i_RegModeId,"Reg"); // CommFun.DW1.Text = "Executive Target Entry"; // panelTargetReg.Controls.Add(frmTargetEnt); // frmTargetEnt.Show(); // } // else // return; //} }
private void ReqListView_DoubleClick(object sender, EventArgs e) { //int ReqId = Convert.ToInt32(ReqListView.GetFocusedRowCellValue("RequestId")); //clsStatics.DW1.Controls.Clear(); //frmRequestEntry frm = new frmRequestEntry(); //frm.RequestId = ReqId; //frm.Dock = DockStyle.Fill; //frm.TopLevel = false; //clsStatics.DW1.Controls.Add(frm); //frm.Show(); if (grdReqList.DataSource != null) { int ReqId = Convert.ToInt32(ReqListView.GetFocusedRowCellValue("RequestId")); if (BsfGlobal.g_bWorkFlow == true) { BsfGlobal.g_bTrans = true; //try { Parent.Controls.Owner.Hide(); } catch { } frmRequestEntry frm = new frmRequestEntry() { RequestId = Convert.ToInt32(ReqListView.GetFocusedRowCellValue("RequestId").ToString()) }; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; m_oGridView = ReqListView; Cursor.Current = Cursors.WaitCursor; DevExpress.XtraEditors.PanelControl oPanel = new DevExpress.XtraEditors.PanelControl(); oPanel = BsfGlobal.GetPanel(frm, "Request Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); frm.TopLevel = false; frm.FormBorderStyle = FormBorderStyle.None; frm.Dock = DockStyle.Fill; oPanel.Controls.Add(frm); frm.Radpanel = Radpanel; frm.RequestId = ReqId; frm.Execute("E"); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { frmRequestEntry frm = new frmRequestEntry() { RequestId = Convert.ToInt32(ReqListView.GetFocusedRowCellValue("RequestId").ToString()) }; Cursor.Current = Cursors.WaitCursor; CommFun.RP1.Controls.Clear(); frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frm.TopLevel = false; CommFun.RP1.Controls.Add(frm); frm.Dock = DockStyle.Fill; frm.Execute("E"); } } }
private void btnEdit_ItemClick(object sender, ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Extra Bill-Modify") == false) { MessageBox.Show("You don't have Rights to Extra Bill-Modify"); return; } //bar1.Visible = false; if (grdBillView.FocusedRowHandle >= 0) { using (DataView dvData = new DataView(dtReg) { RowFilter = String.Format("BillRegId={0}", Convert.ToInt32(CommFun.IsNullCheck(grdBillView.GetFocusedRowCellValue("BillRegId"), CommFun.datatypes.vartypenumeric))) }) { m_iBillRegId = Convert.ToInt32(CommFun.IsNullCheck(grdBillView.GetFocusedRowCellValue("BillRegId"), CommFun.datatypes.vartypenumeric)); s_ProjName = CommFun.IsNullCheck(grdBillView.GetFocusedRowCellValue("ProjectDB"), CommFun.datatypes.vartypestring).ToString(); frmExtraBill frmEBill = new frmExtraBill() { dtComp = dvData.ToTable(), TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill }; if (BsfGlobal.g_bWorkFlow == true) { BsfGlobal.g_bTrans = true; m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow; m_oDW.Hide(); BsfGlobal.g_bTrans = false; Cursor.Current = Cursors.WaitCursor; PanelControl oPanel = new PanelControl(); oPanel = BsfGlobal.GetPanel(frmEBill, "Extra Bill Entry"); if ((oPanel == null)) { return; } oPanel.Controls.Clear(); oPanel.Controls.Add(frmEBill); frmEBill.Execute("E", m_iBillRegId, s_ProjName); oPanel.Visible = true; Cursor.Current = Cursors.Default; } else { m_iBillRegId = Convert.ToInt32(CommFun.IsNullCheck(grdBillView.GetFocusedRowCellValue("BillRegId"), CommFun.datatypes.vartypenumeric)); s_ProjName = CommFun.IsNullCheck(grdBillView.GetFocusedRowCellValue("ProjectDB"), CommFun.datatypes.vartypestring).ToString(); CommFun.DW1.Hide(); CommFun.DW2.Text = "Extra Bill Entry"; frmEBill = new frmExtraBill() { dtComp = dvData.ToTable(), TopLevel = false }; CommFun.RP2.Controls.Clear(); frmEBill.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmEBill.Dock = DockStyle.Fill; CommFun.RP2.Controls.Add(frmEBill); frmEBill.Execute("E", m_iBillRegId, s_ProjName); CommFun.DW2.Show(); } } } }