private void btnProgressEntry_ItemClick(object sender, ItemClickEventArgs e) { CommFun.DW1.Text = "Progress Bill Entry"; radPanel1.Controls.Clear(); frmProgressBill frmProg = new frmProgressBill(); frmProg.TopLevel = false; frmProg.FormBorderStyle = Alias.FormBorderStyle.None; frmProg.Dock = DockStyle.Fill; radPanel1.Controls.Add(frmProg); frmProg.Execute(0, 0, "A", ""); }
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); } } }