Exemple #1
0
        private void barButtonItem34_ItemClick(object sender, ItemClickEventArgs e)
        {
            dwHome.Hide();
            documentWindow1.Hide();
            dwHome.Text = "Extra Bill Entry";
            frmExtraBill frm = new frmExtraBill()
            {
                TopLevel = false
            };

            radPanel1.Controls.Clear();
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.Dock            = DockStyle.Fill;
            radPanel1.Controls.Add(frm);
            frm.Execute();
            dwHome.Show();
        }
Exemple #2
0
        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();
                    }
                }
            }
        }