Example #1
0
 void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (DtGrid.SelectedItems.Count > 0)
     {
         V_PENSIONALARMSET temp = DtGrid.SelectedItems[0] as V_PENSIONALARMSET;
         if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(temp, "T_HR_PENSIONALARMSET", SMT.SaaS.FrameworkUI.OperationType.Edit, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID))
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NOEDITPERMISSION"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
             return;
         }
         PensionAlarmSetForm form    = new PensionAlarmSetForm(FormTypes.Edit, temp.T_HR_PENSIONALARMSET.PENSIONSETID);
         EntityBrowser       browser = new EntityBrowser(form);
         form.MinHeight           = 270.0;
         form.MinWidth            = 400;
         browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
         browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
     }
     else
     {
         //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"));
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"),
                                        Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
     }
 }
Example #2
0
        void btnNew_Click(object sender, RoutedEventArgs e)
        {
            PensionAlarmSetForm form    = new PensionAlarmSetForm(FormTypes.New, "");
            EntityBrowser       browser = new EntityBrowser(form);

            form.MinHeight           = 270.0;
            form.MinWidth            = 400;
            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        }
Example #3
0
 void BtnView_Click(object sender, RoutedEventArgs e)
 {
     if (DtGrid.SelectedItems.Count > 0)
     {
         V_PENSIONALARMSET   temp    = DtGrid.SelectedItems[0] as V_PENSIONALARMSET;
         PensionAlarmSetForm form    = new PensionAlarmSetForm(FormTypes.Browse, temp.T_HR_PENSIONALARMSET.PENSIONSETID);
         EntityBrowser       browser = new EntityBrowser(form);
         form.MinHeight           = 270.0;
         form.MinWidth            = 400;
         browser.FormType         = FormTypes.Browse;
         browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
         browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
     }
     else
     {
         //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"));
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"),
                                        Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
     }
 }