void btnReSubmit_Click(object sender, RoutedEventArgs e)
        {
            if (DaGr.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            if (DaGr.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            V_ContractView ent = DaGr.SelectedItems[0] as V_ContractView;

            ViewContractApplicationControl AddWin = new ViewContractApplicationControl(FormTypes.Resubmit, ent.viewContract.CONTRACTVIEWID);
            EntityBrowser browser = new EntityBrowser(AddWin);

            browser.FormType         = FormTypes.Resubmit;
            browser.MinWidth         = 500;
            browser.MinHeight        = 300;
            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
        }
        void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            string strLeaveTypeSetID = string.Empty;

            if (DaGr.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"), MessageIcon.Exclamation);
                return;
            }

            if (DaGr.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"), MessageIcon.Exclamation);
                return;
            }

            V_ContractView ent = DaGr.SelectedItems[0] as V_ContractView;

            if (ent.viewContract.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString() || ent.viewContract.CHECKSTATE == ((int)CheckStates.UnApproved).ToString())
            {
                ViewContractApplicationControl AddWin = new ViewContractApplicationControl(FormTypes.Edit, ent.viewContract.CONTRACTVIEWID);
                EntityBrowser browser = new EntityBrowser(AddWin);
                browser.FormType         = FormTypes.Edit;
                browser.MinWidth         = 550;
                browser.MinHeight        = 180;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"), Utility.GetResourceStr("CONFIRMBUTTON"), MessageIcon.Exclamation);
                return;
            }
        }
        void btnNew_Click(object sender, RoutedEventArgs e)
        {
            ViewContractApplicationControl AddWin = new ViewContractApplicationControl(FormTypes.New, "");
            EntityBrowser browser = new EntityBrowser(AddWin);

            browser.MinWidth         = 550;
            browser.MinHeight        = 180;
            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
        }
        void btnAudit_Click(object sender, RoutedEventArgs e)
        {
            string strLeaveTypeSetID = string.Empty;

            if (DaGr.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            if (DaGr.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            V_ContractView ent = DaGr.SelectedItems[0] as V_ContractView;

            if (ent.viewContract.CHECKSTATE == ((int)CheckStates.Approving).ToString() ||
                ent.viewContract.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString() ||
                ent.viewContract.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString())
            {
                ViewContractApplicationControl AddWin = new ViewContractApplicationControl(FormTypes.Audit, ent.viewContract.CONTRACTVIEWID);
                EntityBrowser browser = new EntityBrowser(AddWin);
                browser.FormType         = FormTypes.Audit;
                browser.MinWidth         = 550;
                browser.MinHeight        = 180;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTRECORDNOTOPERATEPLEASEAGAIN"));
                return;
            }
        }
Exemplo n.º 5
0
        void btnReSubmit_Click(object sender, RoutedEventArgs e)
        {
            if (DaGr.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            if (DaGr.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            V_ContractView ent = DaGr.SelectedItems[0] as V_ContractView;

            ViewContractApplicationControl AddWin = new ViewContractApplicationControl(FormTypes.Resubmit, ent.viewContract.CONTRACTVIEWID);
            EntityBrowser browser = new EntityBrowser(AddWin);
            browser.FormType = FormTypes.Resubmit;
            browser.MinWidth = 500;
            browser.MinHeight = 300;
            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
        }
Exemplo n.º 6
0
        void btnAudit_Click(object sender, RoutedEventArgs e)
        {
            string strLeaveTypeSetID = string.Empty;
            if (DaGr.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            if (DaGr.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            V_ContractView ent = DaGr.SelectedItems[0] as V_ContractView;
            if (ent.viewContract.CHECKSTATE == ((int)CheckStates.Approving).ToString() ||
                ent.viewContract.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString() ||
                ent.viewContract.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString())
            {
                ViewContractApplicationControl AddWin = new ViewContractApplicationControl(FormTypes.Audit, ent.viewContract.CONTRACTVIEWID);
                EntityBrowser browser = new EntityBrowser(AddWin);
                browser.FormType = FormTypes.Audit;
                browser.MinWidth = 550;
                browser.MinHeight = 180;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTRECORDNOTOPERATEPLEASEAGAIN"));
                return;
            }
        }
Exemplo n.º 7
0
 void btnNew_Click(object sender, RoutedEventArgs e)
 {
     ViewContractApplicationControl AddWin = new ViewContractApplicationControl(FormTypes.New, "");
     EntityBrowser browser = new EntityBrowser(AddWin);
     browser.MinWidth = 550;
     browser.MinHeight = 180;
     browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
     browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
 }
Exemplo n.º 8
0
        void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            string strLeaveTypeSetID = string.Empty;
            if (DaGr.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"), MessageIcon.Exclamation);
                return;
            }

            if (DaGr.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"), MessageIcon.Exclamation);
                return;
            }

            V_ContractView ent = DaGr.SelectedItems[0] as V_ContractView;
            if (ent.viewContract.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString() || ent.viewContract.CHECKSTATE == ((int)CheckStates.UnApproved).ToString())
            {
                ViewContractApplicationControl AddWin = new ViewContractApplicationControl(FormTypes.Edit, ent.viewContract.CONTRACTVIEWID);
                EntityBrowser browser = new EntityBrowser(AddWin);
                browser.FormType = FormTypes.Edit;
                browser.MinWidth = 550;
                browser.MinHeight = 180;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"), Utility.GetResourceStr("CONFIRMBUTTON"), MessageIcon.Exclamation);
                return;
            }
        }