Ejemplo n.º 1
0
        private void BtnSet_FindClick(object sender, RoutedEventArgs e)
        {
            //string SysUserID = "";

            ForbidInfosList.Add(sysUser.EMPLOYEEID);

            if (ForbidInfosList.Count() > 0)
            {
                string        Result = "";
                ComfirmWindow com    = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    if (sysUser.STATE == "1")
                    {
                        ServiceClent.SysUserBatchUpdateAsync(ForbidInfosList, Common.CurrentLoginUserInfo.SysUserID, Common.CurrentLoginUserInfo.EmployeeName, "0");
                    }
                    else
                    {
                        ServiceClent.SysUserBatchUpdateAsync(ForbidInfosList, Common.CurrentLoginUserInfo.SysUserID, Common.CurrentLoginUserInfo.EmployeeName, "1");
                    }
                };
                if (sysUser.STATE == "1")
                {
                    com.SelectionBox("禁用用户", "确定禁用用户吗?", ComfirmWindow.titlename, Result);
                }
                if (sysUser.STATE == "0")
                {
                    com.SelectionBox("启用用户", "确定启用用户吗?", ComfirmWindow.titlename, Result);
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void ButtonDelete_Click(object sender, RoutedEventArgs e)
 {
     if (dgModelCode.SelectedItems.Count > 1)
     {
         ComfirmWindow.ConfirmationBox("提示信息", "只能选择一条需要删除的记录!", "确定");
         return;
     }
     if (dgModelCode.SelectedItems.Count == 1)
     {
         string        Result = "";
         ComfirmWindow com    = new ComfirmWindow();
         com.OnSelectionBoxClosed += (obj, result) =>
         {
             pBar.Start();
             FLOW_MODELDEFINE_T            define = (dgModelCode.SelectedItem as FLOW_MODELDEFINE_T);
             ObservableCollection <string> delete = new ObservableCollection <string>();
             delete.Add(define.MODELCODE);
             client.DeleteModelDefineAsync(delete);
         };
         com.SelectionBox("删除确定", "你确定删除选中的记录吗?", ComfirmWindow.titlename, Result);
     }
     else
     {
         ComfirmWindow.ConfirmationBox("提示信息", "请先选择一条需要删除的记录!", "确定");
     }
 }
Ejemplo n.º 3
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";

            if (dataMaster.SelectedItems.Count > 0)
            {
                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    ObservableCollection <string> ids = new ObservableCollection <string>();
                    foreach (T_HR_IMPORTSETMASTER tmp in dataMaster.SelectedItems)
                    {
                        ids.Add(tmp.MASTERID);
                    }
                    client.ImportSetMasterDeleteAsync(ids);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Ejemplo n.º 4
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";
            ObservableCollection <string> ids = new ObservableCollection <string>();

            if (DtGrid.SelectedItems.Count > 0)
            {
                for (int i = 0; i < DtGrid.SelectedItems.Count; i++)
                {
                    T_HR_EMPLOYEEADDSUM tmpEnt = DtGrid.SelectedItems[i] as T_HR_EMPLOYEEADDSUM;
                    ids.Add(tmpEnt.ADDSUMID);
                    if (!(tmpEnt.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString() || tmpEnt.CHECKSTATE == Convert.ToInt32(CheckStates.UnApproved).ToString()))
                    {
                        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTDELETE"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                        // Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTDELETE"));
                        return;
                    }
                }
                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    client.EmployeeAddSumDeleteAsync(ids);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
                return;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        ///点击导入,进行保存
        /// </summary>
        private void Save()
        {
            if (listOrgInfo == null || listOrgInfo.Count() == 0)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), "没有信息可以导入",
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                return;
            }
            bool flag = true;

            listOrgInfo.ForEach(it =>
            {
                if (!string.IsNullOrWhiteSpace(it.ErrorMsg))
                {
                    flag = false;
                }
            });
            if (!flag)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), "导入数据存在错误,请参照表格后面的提示信息进行修改",
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                return;
            }
            string        strMsg = string.Empty, Result = string.Empty;
            string        companyID = (acbCompanyName.SelectedItem as T_HR_COMPANY).COMPANYID;
            ComfirmWindow com       = new ComfirmWindow();

            com.OnSelectionBoxClosed += (objcom, result) =>
            {
                RefreshUI(RefreshedTypes.ShowProgressBar);
                client.AddBatchOrgInfoAsync(listOrgInfo, companyID, strMsg);
            };
            com.SelectionBox("导入确认", "是否确认要导入部门岗位信息", ComfirmWindow.titlename, Result);
        }
Ejemplo n.º 6
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";
            string strMsg = "";

            if (SelectPost != null)
            {
                if (SelectPost.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("Msg_NoDeleteOrder"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                    return;
                }

                //if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(SelectPost, "T_HR_POST", SMT.SaaS.FrameworkUI.OperationType.Delete, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID))
                //{
                //    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NODELETEPERMISSION", SelectPost.T_HR_POSTDICTIONARY.POSTNAME),
                //  Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                //    return;
                //}
                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    client.PostDeleteAsync(SelectPost.POSTID, strMsg);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                // ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string strID = "";

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

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

            foreach (object ovj in dgSTList.SelectedItems)
            {
                T_HR_SCHEDULINGTEMPLATEMASTER entTemplateMaste = ovj as T_HR_SCHEDULINGTEMPLATEMASTER;
                string Result = "";
                if (entTemplateMaste != null)
                {
                    strID = entTemplateMaste.TEMPLATEMASTERID;

                    ComfirmWindow delComfirm = new ComfirmWindow();
                    delComfirm.OnSelectionBoxClosed += (obj, result) =>
                    {
                        clientAtt.RemoveSchedulingTemplateMasterAsync(strID);
                    };
                    delComfirm.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                }
            }
        }
Ejemplo n.º 8
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";

            if (DtGrid.SelectedItems.Count > 0)
            {
                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    ObservableCollection <string> ids = new ObservableCollection <string>();
                    foreach (T_HR_RESUME tmp in DtGrid.SelectedItems)
                    {
                        if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(tmp, "T_HR_RESUME", SMT.SaaS.FrameworkUI.OperationType.Delete, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID))
                        {
                            ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NOPERMISSIONDELETE", tmp.NAME + ",RESUME"),
                                                           Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                            return;
                        }
                        ids.Add(tmp.RESUMEID);
                    }
                    client.ResumeDeleteAsync(ids);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Ejemplo n.º 9
0
 /// <summary>
 /// 删除流程事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDeleteFlow_Click(object sender, RoutedEventArgs e)
 {
     if (ucFlowlist.dgrFlows.SelectedItems.Count > 0)
     {
         string        Result = "";
         ComfirmWindow com    = new ComfirmWindow();
         com.OnSelectionBoxClosed += (obj, result) =>
         {
             ucFlowlist.pBar.Start();
             ObservableCollection <string> flowList = new ObservableCollection <string>();
             int count = ucFlowlist.dgrFlows.SelectedItems.Count;
             for (int i = 0; i < count; i++)
             {
                 var entity = (ucFlowlist.dgrFlows.SelectedItems[i] as V_FlowDefine);
                 flowList.Add(entity.FlowCode);
             }
             client.DeleteFlowAsync(flowList);
         };
         com.SelectionBox("删除确定", "你确定删除选中的流程吗?", ComfirmWindow.titlename, Result);
     }
     else
     {
         ComfirmWindow.ConfirmationBox("提示信息", "没有选中流程,请先选择流程进行删除!", "确定");
     }
 }
Ejemplo n.º 10
0
        //void btnEdit_Click(object sender, RoutedEventArgs e)
        //{
        //    if (DtGrid.SelectedItems.Count > 0)
        //    {
        //        T_HR_PERFORMANCEREWARDSET tmpEnt = DtGrid.SelectedItems[0] as T_HR_PERFORMANCEREWARDSET;

        //        Form.Salary.PerformanceRewardSetForm form = new SMT.HRM.UI.Form.Salary.PerformanceRewardSetForm(FormTypes.Edit, tmpEnt.PERFORMANCEREWARDSETID);

        //        EntityBrowser browser = new EntityBrowser(form);
        //
        //        browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
        //        browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) =>{});
        //    }
        //}

        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";

            if (DtGrid.SelectedItems.Count > 0)
            {
                ObservableCollection <string> ids = new ObservableCollection <string>();

                foreach (T_HR_PERFORMANCEREWARDRECORD tmp in DtGrid.SelectedItems)
                {
                    ids.Add(tmp.PERFORMANCEREWARDRECORDID);
                    if (!(tmp.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString() || tmp.CHECKSTATE == Convert.ToInt32(CheckStates.UnApproved).ToString()))
                    {
                        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTDELETE"),
                                                       Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                        //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTDELETE"));
                        return;
                    }
                }

                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    client.PerformanceRewardRecordDeleteAsync(ids);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
                return;
            }
        }
Ejemplo n.º 11
0
        //删除
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection <T_OA_MAINTENANCEAPP> selectInfoList = GetSelectList();

            if (selectInfoList != null && selectInfoList.Count > 0)
            {
                for (int i = 0; i < dg.SelectedItems.Count; i++)
                {
                    selApporvalInfo = selectInfoList[i];
                    if (selApporvalInfo.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString())
                    {
                        string        Result = "";
                        ComfirmWindow com    = new ComfirmWindow();
                        com.OnSelectionBoxClosed += (obj, result) =>
                        {
                            try { maWS.DeleteMaintenanceAppListAsync(selectInfoList); }
                            catch { }
                        };
                        com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                    }
                    else
                    {
                        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTONLYDIDNOSUBMITANDREVIEWTHEDATACANBEDELETEDBY"));
                        return;
                    }
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 12
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            if (DtGrid.SelectedIndex != -1)
            {
                //ComfirmBox deleComfir = new ComfirmBox();
                //deleComfir.Title = Utility.GetResourceStr("DELETECONFIRM");
                //deleComfir.MessageTextBox.Text = Utility.GetResourceStr("DELETEALTER");
                //deleComfir.ButtonOK.Click += new RoutedEventHandler(ButtonOK1_Click);
                //deleComfir.Show();

                string Result = "";
                if (DtGrid.SelectedItems.Count > 0)
                {
                    ObservableCollection <string> ids = new ObservableCollection <string>();

                    foreach (V_CUSTOMGUERDON tmp in DtGrid.SelectedItems)
                    {
                        ids.Add(tmp.CUSTOMGUERDONID);
                    }

                    ComfirmWindow com = new ComfirmWindow();
                    com.OnSelectionBoxClosed += (obj, result) =>
                    {
                        client.CustomGuerdonDeleteAsync(ids);
                    };
                    com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                    //LoadData(SAVEID);
                }
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
            }
        }
Ejemplo n.º 13
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";

            if (DtGrid.SelectedItems.Count > 0)
            {
                ObservableCollection <string> ids = new ObservableCollection <string>();

                foreach (T_HR_PERFORMANCEREWARDSET tmp in DtGrid.SelectedItems)
                {
                    ids.Add(tmp.PERFORMANCEREWARDSETID);
                }

                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    client.PerformanceRewardSetDeleteAsync(ids);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
                return;
            }
        }
Ejemplo n.º 14
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            if (DtGrid.SelectedIndex != -1)
            {
                string Result = "";
                if (DtGrid.SelectedItems.Count > 0)
                {
                    ObservableCollection <string> ids = new ObservableCollection <string>();

                    foreach (T_HR_SALARYTAXES tmp in DtGrid.SelectedItems)
                    {
                        ids.Add(tmp.SALARYTAXESID);
                    }

                    ComfirmWindow com = new ComfirmWindow();
                    com.OnSelectionBoxClosed += (obj, result) =>
                    {
                        client.SalaryTaxesDeleteAsync(ids);
                    };
                    com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
            }
        }
Ejemplo n.º 15
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";
            string strMsg = string.Empty;

            if (DtGrid.SelectedItems.Count > 0)
            {
                //判断是否可以删除
                ObservableCollection <string> ids = new ObservableCollection <string>();
                foreach (T_HR_DEPARTMENTDICTIONARY tmp in DtGrid.SelectedItems)
                {
                    if (tmp.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                    {
                        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("Msg_NoDeleteOrder"),
                                                       Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);

                        return;
                    }
                    ids.Add(tmp.DEPARTMENTDICTIONARYID);
                }

                //提示是否删除
                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    svc.DepartmentDictionaryDeleteAsync(ids, strMsg);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Ejemplo n.º 16
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            agentsetId = new ObservableCollection <string>();
            if (DaGr.SelectedItems.Count > 0)
            {
                for (int i = 0; i < DaGr.SelectedItems.Count; i++)
                {
                    T_OA_AGENTDATESET ent = DaGr.SelectedItems[i] as T_OA_AGENTDATESET;

                    agentsetId.Add((DaGr.SelectedItems[i] as T_OA_AGENTDATESET).AGENTDATESETID);

                    string        Result = "";
                    ComfirmWindow com    = new ComfirmWindow();
                    com.OnSelectionBoxClosed += (obj, result) =>
                    {
                        SoaChannel.DeleteAgentDataSetAsync(agentsetId);
                        LoadData();
                    };
                    com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnLTDelete_Click(object sender, RoutedEventArgs e)
        {
            string strID = "";

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

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

            foreach (object ovj in dgLTList.SelectedItems)
            {
                T_HR_LEAVETYPESET ent    = ovj as T_HR_LEAVETYPESET;
                string            Result = "";
                if (ent != null)
                {
                    strID = ent.LEAVETYPESETID;

                    ComfirmWindow delComfirm = new ComfirmWindow();
                    delComfirm.OnSelectionBoxClosed += (obj, result) =>
                    {
                        clientAtt.RemoveLeaveTypeSetAsync(strID);
                    };
                    delComfirm.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                }
            }
        }
Ejemplo n.º 18
0
        public void DoAction(string actionType)
        {
            switch (actionType)
            {
            case "0":
                refreshType = RefreshedTypes.All;
                Save();
                break;

            //case "1":
            //    refreshType = RefreshedTypes.CloseAndReloadData;
            //    Save();
            //    break;
            case "3":    //删除
                string        Result = "";
                ComfirmWindow com    = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    try
                    {
                        bool FBControl = true;
                        ObservableCollection <string> businesstripId = new ObservableCollection <string>();  //出差申请ID
                        businesstripId.Add(businesstrID);
                        this.RefreshUI(RefreshedTypes.ShowProgressBar);
                        OaPersonOfficeClient.DeleteTravelReimbursementByBusinesstripIdAsync(businesstripId, FBControl);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString());
                    }
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), "确认是否删除此条记录?", ComfirmWindow.titlename, Result);
                break;
            }
        }
Ejemplo n.º 19
0
        public void DoAction(string actionType)
        {
            switch (actionType)
            {
            case "0":
                refreshType = RefreshedTypes.All;
                Save();
                break;

            case "3":
                string        Result = "";
                ComfirmWindow com    = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    bool FBControl = true;
                    ObservableCollection <string> businesstripId = new ObservableCollection <string>();  //出差申请ID
                    businesstripId.Add(Master_Golbal.BUSINESSTRIPID);
                    this.RefreshUI(RefreshedTypes.ShowProgressBar);
                    OaPersonOfficeClient.DeleteTravelmanagementAsync(businesstripId, FBControl);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), "确认是否删除此条记录?", ComfirmWindow.titlename, Result);

                break;
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 删除地区分类
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";


            if (DtGridArea.SelectedItems.Count > 0)
            {
                ObservableCollection <string> ids = new ObservableCollection <string>();

                foreach (T_OA_AREADIFFERENCE tmp in DtGridArea.SelectedItems)
                {
                    if (Common.CurrentLoginUserInfo.UserPosts[0].CompanyID != tmp.CREATECOMPANYID)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("PROMPT"), "不能删除修改其他公司创建的的城市分类");
                        return;
                    }
                    ids.Add(tmp.AREADIFFERENCEID);
                }

                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    client.AreaCategoryDeleteAsync(ids);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
            }
        }
Ejemplo n.º 21
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string strID = "";

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

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

            foreach (object ovj in dgORList.SelectedItems)
            {
                T_HR_OVERTIMEREWARD entOT = ovj as T_HR_OVERTIMEREWARD;

                string Result = "";
                if (entOT != null)
                {
                    strID = entOT.OVERTIMEREWARDID.ToString();
                    ComfirmWindow delComfirm = new ComfirmWindow();
                    delComfirm.OnSelectionBoxClosed += (obj, result) =>
                    {
                        clientAtt.RemoveOvertimeRewardAsync(strID);
                    };
                    delComfirm.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                }
            }
        }
Ejemplo n.º 22
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            WelfareProvisionID = new ObservableCollection <string>();
            if (DaGr.SelectedItems.Count > 0)
            {
                for (int i = 0; i < DaGr.SelectedItems.Count; i++)
                {
                    V_WelfareProvision ent = DaGr.SelectedItems[i] as V_WelfareProvision;
                    if (ent.welfareProvision.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString())
                    {
                        WelfareProvisionID.Add((DaGr.SelectedItems[i] as V_WelfareProvision).welfareProvision.WELFAREDISTRIBUTEMASTERID);

                        string        Result = "";
                        ComfirmWindow com    = new ComfirmWindow();
                        com.OnSelectionBoxClosed += (obj, result) =>
                        {
                            BenefitsAdministration.DeleteWelfareProvisionAsync(WelfareProvisionID);
                            LoadData();
                        };
                        com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                    }
                    else
                    {
                        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTONLYDIDNOSUBMITANDREVIEWTHEDATACANBEDELETEDBY"));
                        return;
                    }
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 23
0
        //撤销岗位
        void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";
            string strMsg = "";

            if (SelectPost != null)
            {
                if (SelectPost.CHECKSTATE != Convert.ToInt32(CheckStates.Approved).ToString())
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("审核通过的才能进行撤销"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                    return;
                }
                if (SelectPost.EDITSTATE == Convert.ToInt32(EditStates.Canceled).ToString())
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("已经撤销了"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                    return;
                }
                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    SelectPost.EDITSTATE  = Convert.ToInt32(EditStates.PendingCanceled).ToString();
                    SelectPost.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                    client.PostCancelAsync(SelectPost, strMsg);
                };
                com.SelectionBox(Utility.GetResourceStr("CANCELALTER"), Utility.GetResourceStr("CANCELCONFIRM"), ComfirmWindow.titlename, Result);
            }

            else
            {
                //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "CANCEL"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "CANCEL"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 删除指定班次定义(物理删除,暂定)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string strID = "";

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

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

            foreach (object ovj in dgSEList.SelectedItems)
            {
                T_HR_SHIFTDEFINE entShiftDefine = ovj as T_HR_SHIFTDEFINE;
                string           Result         = "";
                if (entShiftDefine != null)
                {
                    strID = entShiftDefine.SHIFTDEFINEID;

                    ComfirmWindow delComfirm = new ComfirmWindow();
                    delComfirm.OnSelectionBoxClosed += (obj, result) =>
                    {
                        clientAtt.RemoveShiftDefineAsync(strID);
                    };
                    delComfirm.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                }
            }
        }
Ejemplo n.º 25
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     selectedList = GetSelectList();
     if (selectedList != null)
     {
         if (SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonByOperationControl(selectedList[0], OperationType.Delete, Common.CurrentLoginUserInfo.EmployeeID))
         {
             string        Result = "";
             ComfirmWindow com    = new ComfirmWindow();
             com.OnSelectionBoxClosed += (obj, result) =>
             {
                 if (selectedList != null)
                 {
                     try
                     { workerCordManager.DeleteWorkerCordListAsync(selectedList); }
                     catch
                     { }
                 }
             };
             com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
         }
         else
         {
             Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("YOUDONOTHAVEPERMISSIONTOOPERATETHEDATA"));
         }
     }
     else
     {
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
     }
 }
Ejemplo n.º 26
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     if (DaGr.SelectedItems.Count > 0)
     {
         string Result = "";
         houseDelID = new ObservableCollection <string>();
         ComfirmWindow com = new ComfirmWindow();
         com.OnSelectionBoxClosed += (obj, result) =>
         {
             for (int i = 0; i < DaGr.SelectedItems.Count; i++)
             {
                 string GradeID = "";
                 GradeID = (DaGr.SelectedItems[i] as T_OA_HOUSEINFO).HOUSEID;
                 if (!(houseDelID.IndexOf(GradeID) > -1))
                 {
                     houseDelID.Add(GradeID);
                 }
             }
             string errorMsg = "";
             client.DeleteHouseAsync(houseDelID, errorMsg);
         };
         com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
     }
     else
     {
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
     }
 }
Ejemplo n.º 27
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            DelInfosList.Clear();
            if (this.DtGrid.SelectedItems != null)
            {
                foreach (T_SYS_ROLE n in this.DtGrid.SelectedItems)
                {
                    if (!(DelInfosList.IndexOf(n.ROLEID) > 0))
                    {
                        DelInfosList.Add(n.ROLEID);
                    }
                }
                //if (!(DelInfosList.IndexOf(SelectRole.ROLEID) > 0))
                //{
                //    DelInfosList.Add(SelectRole.ROLEID);
                //}
            }

            if (DelInfosList.Count() > 0)
            {
                string        Result = "";
                ComfirmWindow com    = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    ServiceClient.SysRoleBatchDelAsync(DelInfosList);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), "请您选择需要删除的数据!", Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }
        }
Ejemplo n.º 28
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)//删除
        {
            ObservableCollection <V_Satisfaction> selectItems = GetSelectList();

            if (selectItems != null)
            {
                for (int i = 0; i < dg.SelectedItems.Count; i++)
                {
                    V_Satisfaction ent = dg.SelectedItems[i] as V_Satisfaction;
                    if (ent.RequireMaster.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString())
                    {
                        string        Result = "";
                        ComfirmWindow com    = new ComfirmWindow();
                        com.OnSelectionBoxClosed += (obj, result) =>
                        {
                            try { client.Del_SSurveysAsync(selectItems); }
                            catch { }
                        };
                        com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                    }
                    else
                    {
                        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTONLYDIDNOSUBMITANDREVIEWTHEDATACANBEDELETEDBY"));
                        return;
                    }
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 29
0
        private void btnDel_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";
            string strMsg = string.Empty;

            if (DtGrid.SelectedItems.Count > 0)
            {
                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    ObservableCollection <string> ids = new ObservableCollection <string>();

                    foreach (T_HR_KPITYPE tmp in DtGrid.SelectedItems)
                    {
                        ids.Add(tmp.KPITYPEID);
                    }
                    client.DeleteKPITypesAsync(ids, strMsg);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Ejemplo n.º 30
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     if (DaGr.SelectedItems.Count > 0)
     {
         string Result = "";
         DelInfosList = new ObservableCollection <string>();
         ComfirmWindow com = new ComfirmWindow();
         com.OnSelectionBoxClosed += (obj, result) =>
         {
             for (int i = 0; i < DaGr.SelectedItems.Count; i++)
             {
                 string PriorityID = "";
                 PriorityID = (DaGr.SelectedItems[i] as T_OA_PRIORITIES).PRIORITIESID;
                 if (!(DelInfosList.IndexOf(PriorityID) > -1))
                 {
                     DelInfosList.Add(PriorityID);
                 }
             }
             BumfClient.DocPriorityBatchDelAsync(DelInfosList);
         };
         com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
     }
     else
     {
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
     }
 }