Beispiel #1
0
        private void examine(string okOrNot)
        {
            if (inputCheck())
            {
                DataRow sessionDr = Session["seldSelfPayment"] as DataRow;

                string strPayId      = sessionDr["paymentId"].ToString();
                string strPayComment = txtPayComment.Text.Trim();

                DataSet             dst = new DataSet();
                PaymentApplyProcess pap = new PaymentApplyProcess(dst);

                pap.SelfPaymentExamine(strPayId, okOrNot, strPayComment);

                Xm_db xmDataCont = Xm_db.GetInstance();

                int usrId   = int.Parse(sessionDr["usrId"].ToString());
                var usrInfo =
                    from usr in xmDataCont.Tbl_usr
                    where usr.UsrId == usrId &&
                    usr.EndTime > DateTime.Now
                    select usr;

                string projetTag = sessionDr["projectTag"].ToString();

                if (okOrNot.Equals(bool.TrueString))
                {
                    //int flag = 0x80;
                    var usr_autority =
                        from usr in xmDataCont.Tbl_usr
                        //join auth in xmDataCont.View_usr_autority on usr.UsrId equals auth.UsrId
                        where (usr.TotleAuthority & (UInt32)AuthAttributes.pay_receiptOk) != 0 &&
                        usr.EndTime > DateTime.Now
                        select usr;
                    //where usr.TotleAuthority.ToAuthAttr().HasOneFlag(AuthAttributes.pay_receiptOk) &&
                    //      usr.EndTime > DateTime.Now
                    //select usr;

                    foreach (var usr in usr_autority)
                    {
                        BeckSendMail.getMM().NewMail(usr.UsrEmail,
                                                     "mis系统票务通知",
                                                     "付款申请已通过审批,请尽快完成后续工作" + System.Environment.NewLine + Request.Url.toNewUrlForMail("/Main/paymentReceiptManager/paymentOk.aspx"));
                    }

                    BeckSendMail.getMM().NewMail(usrInfo.First().UsrEmail,
                                                 "mis系统票务通知",
                                                 projetTag + "的付款申请已通过审批,请尽快完成后续工作");
                }
                else
                {
                    BeckSendMail.getMM().NewMail(usrInfo.First().UsrEmail, "mis系统票务通知", projetTag + "的付款申请暂缓,请尽快完成后续工作");
                }

                Response.Redirect("~/Main/infoViewManager/paymentInfo/paymentView.aspx");
            }
        }