Esempio n. 1
0
        public void ShowDriverRent(int Id)
        {
            frmDriverRentDebitCredit frm = new frmDriverRentDebitCredit();

            frm.OnDisplayRecord(Id);


            DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("frmfrmDriverRentDebitCredit1");

            if (doc != null)
            {
                doc.Close();
            }

            MainMenuForm.MainMenuFrm.ShowForm(frm);
        }
Esempio n. 2
0
        void AddRentItems1_Click(object sender, EventArgs e)
        {
            try
            {
                if (grdLister.CurrentRow != null && grdLister.CurrentRow is GridViewDataRowInfo)
                {
                    int id = grdLister.CurrentRow.Cells["Id"].Value.ToInt();
                    //if (AppVars.listUserRights.Count(c => c.formName == "frmDriverRent") > 0)
                    //{
                    //    frmDriverRent frm = new frmDriverRent(id);

                    //    DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("frmDriverRent1");

                    //    if (doc != null)
                    //    {
                    //        doc.Close();
                    //    }

                    //    MainMenuForm.MainMenuFrm.ShowForm(frm);

                    //}
                    //else
                    //{
                    if (AppVars.listUserRights.Count(c => c.formName == "frmDriverRentDebitCredit") > 0)
                    {
                        frmDriverRentDebitCredit frm = new frmDriverRentDebitCredit(id);

                        DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("frmDriverRentDebitCredit1");

                        if (doc != null)
                        {
                            doc.Close();
                        }

                        MainMenuForm.MainMenuFrm.ShowForm(frm);
                    }
                }
                //}
            }
            catch (Exception ex)
            {
                ENUtils.ShowMessage(ex.Message);
            }
        }
        void ShowForm(long id)
        {
            //if (AppVars.listUserRights.Count(c => c.formName == "frmDriverRent") > 0)
            //{
            //    frmDriverRent frm = new frmDriverRent();
            //    frm.OnDisplayRecord(id);


            //    DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("frmDriverRent1");

            //    if (doc != null)
            //    {
            //        doc.Close();
            //    }

            //    MainMenuForm.MainMenuFrm.ShowForm(frm);
            //}
            //else
            //{
            //frmDriverRentDebitCredit
            if (AppVars.listUserRights.Count(c => c.formName == "frmDriverRentDebitCredit") > 0)
            {
                frmDriverRentDebitCredit frm = new frmDriverRentDebitCredit();
                frm.OnDisplayRecord(id);


                DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("frmDriverRentDebitCredit1");

                if (doc != null)
                {
                    doc.Close();
                }

                MainMenuForm.MainMenuFrm.ShowForm(frm);
            }
            //}
        }