Ejemplo n.º 1
0
        public void Dispose(Entities.QSResultStatus status, Entities.QSApprovalType type, bool IsReject, out string msg)
        {
            msg = string.Empty;
            int rid = 0;

            if (int.TryParse(RequestQS_RID, out rid))
            {
                Entities.QS_Result info = BLL.QS_Result.Instance.GetQS_Result(rid);
                if (info != null)
                {
                    int userId = BLL.Util.GetLoginUserID();
                    info.Status       = (int)status;
                    info.ModifyTime   = DateTime.Now;
                    info.ModifyUserID = userId;

                    Entities.QS_ApprovalHistory model = new QS_ApprovalHistory();
                    model.CreateTime   = DateTime.Now;
                    model.CreateUserID = userId;
                    model.QS_RID       = rid;
                    model.QS_RTID      = info.QS_RTID;
                    model.Remark       = RequestRemark;
                    model.Status       = (int)status;
                    model.ApprovalType = ((int)type).ToString();
                    if (type != QSApprovalType.ScoreAppeal)
                    {
                        if (IsReject)
                        {
                            model.ApprovalResult = 2;
                            info.StateResult     = 2;
                        }
                        else
                        {
                            model.ApprovalResult = 1;
                            info.StateResult     = 1;
                        }
                    }
                    model.Type = "1";
                    BLL.QS_Result.Instance.Update(info);
                    BLL.QS_ApprovalHistory.Instance.Insert(model);
                    msg = "success";
                }
                else
                {
                    msg = "不存在此评分";
                }
            }
        }
Ejemplo n.º 2
0
        public void Dispose(Entities.QSResultStatus status, Entities.QSApprovalType type, bool IsReject, out string msg)
        {
            msg = string.Empty;
            int rid = 0;

            if (int.TryParse(RequestQS_RID, out rid))
            {
                QS_IM_ResultInfo info = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(rid));
                if (info != null)
                {
                    int userId = BLL.Util.GetLoginUserID();
                    info.Status       = (int)status;
                    info.ModifyTime   = DateTime.Now;
                    info.ModifyUserID = userId;

                    Entities.QS_ApprovalHistory model = new BitAuto.ISDC.CC2012.Entities.QS_ApprovalHistory();
                    model.CreateTime   = DateTime.Now;
                    model.CreateUserID = userId;
                    model.QS_RID       = rid;
                    model.QS_RTID      = info.QS_RTID;
                    model.Remark       = RequestRemark;
                    model.Status       = (int)status;
                    model.ApprovalType = ((int)type).ToString();
                    if (type != QSApprovalType.ScoreAppeal)
                    {
                        if (IsReject)
                        {
                            model.ApprovalResult = 2;
                            info.StateResult     = 2;
                        }
                        else
                        {
                            model.ApprovalResult = 1;
                            info.StateResult     = 1;
                        }
                    }
                    model.Type = "1";
                    CommonBll.Instance.UpdateComAdoInfo(info);
                    BLL.QS_ApprovalHistory.Instance.Insert(model);
                    msg = "success";
                }
                else
                {
                    msg = "不存在此评分";
                }
            }
        }