Пример #1
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);
            }
        }