Beispiel #1
0
 //
 private string Create(HttpContext context)
 {
     try
     {
         SysLogBll.Create("出让标", "添加出让标操作", adminUser.AdminName);
         NCPEP.Bll.T_Bid bllbid = new T_Bid();
         //int id = (int)dal.Create(GetModels(context));
         int id = (int)bllbid.Add(GetModels(context));
         if (id > 0)
         {
             TranProcessDal tpd = new TranProcessDal();
             if (tpd.Exists(id))
             {
                 string column = string.Format("AcceptDate='{0}'", DateTime.Now.ToString());
                 tpd.Update(column, id);
             }
             else
             {
                 string column = "FK_BidId,AcceptDate";
                 string values = string.Format("{0},'{1}'", id, DateTime.Now.ToString());
                 tpd.Create(column, values);
             }
             return("添加成功!");
         }
         else
         {
             return("添加失败请重新操作! ");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return("添加失败请重新操作,错误代码:500 ");
     }
 }
Beispiel #2
0
        private string Create(HttpContext context)
        {
            try
            {
                SysLogBll.Create("标信息审核流程", "添加标信息审核流程操作", adminUser.AdminName);
                int BidId        = 0;
                int UpManager    = 0;
                int DepaStatusId = 1;
                BidId     = int.Parse(context.Request.QueryString["BidId"]);
                UpManager = int.Parse(context.Request.QueryString["UpManager"]);
                string OrgCode = context.Request.QueryString["OrgCode"];
                DepaStatusId = int.Parse(context.Request.QueryString["DepaStatusId"]);
                if (UpManager == 1 || OrgCode == adminUser.OrgCode)
                {
                    string column = "";
                    switch (DepaStatusId)
                    {
                    case 1:
                        string[] strArray = new string[] { adminUser.AdminName, context.Request.QueryString["AcceptSay"], DateTime.Now.ToString(), DateTime.Now.ToString() };
                        column = string.Format(" AcceptName ='{0}',AcceptSay='{1}',AcceptSayDate='{2}',AuditDate='{3}'", strArray);
                        break;

                    case 2:
                        strArray = new string[] { adminUser.AdminName, context.Request.QueryString["AuditSay"], DateTime.Now.ToString(), DateTime.Now.ToString() };
                        column   = string.Format(" AuditName ='{0}',AuditSay='{1}',AuditSayDate='{2}',TradingDate='{3}'", strArray);
                        break;

                    case 3:
                        strArray = new string[] { adminUser.AdminName, context.Request.QueryString["TradingSay"], DateTime.Now.ToString(), DateTime.Now.ToString() };
                        column   = string.Format(" TradingName ='{0}',TradingSay='{1}',TradingSayDate='{2}',AttestationDate='{3}'", strArray);
                        break;

                    case 4:
                        strArray = new string[] { adminUser.AdminName, context.Request.QueryString["AttestationSay"], DateTime.Now.ToString(), DateTime.Now.ToString() };
                        column   = string.Format(" AttestationName ='{0}',AttestationSay='{1}',AttestationSayDate='{2}',HeadDate='{3}'", strArray);
                        break;

                    case 5:
                        strArray = new string[] { adminUser.AdminName, context.Request.QueryString["HeadSay"], DateTime.Now.ToString(), DateTime.Now.ToString() };
                        column   = string.Format(" HeadName ='{0}',HeadSay='{1}',HeadSayDate='{2}',SuperDate='{3}'", strArray);
                        break;

                    case 6:
                        strArray = new string[] { adminUser.AdminName, context.Request.QueryString["SuperSay"], DateTime.Now.ToString() };
                        column   = string.Format(" SuperName ='{0}',SuperSay='{1}',SuperSayDate='{2}'", strArray);
                        break;
                    }
                    //
                    TranProcessDal tpd = new TranProcessDal();
                    if (!tpd.Exists(BidId))
                    {
                        string col    = "FK_BidId,AcceptDate";
                        string values = string.Format("{0},'{1}'", BidId, DateTime.Now.ToString());
                        tpd.Create(col, values);
                    }
                    //
                    if (dal.Update(column, BidId))
                    {
                        int value = (DepaStatusId + 1);
                        if (new BidDal().UpdateState("DepaStatus", value, BidId))
                        {
                            new BidDal().UpdateState("ReturnStatus", 0, BidId);
                            return("审核成功,信息上报成功!");
                        }
                        else
                        {
                            return("审核失败,信息上报失败!");
                        }
                    }
                    else
                    {
                        return("失败请重新操作! ");
                    }
                }
                else
                {
                    return("该标的信息没有提交上级审核!");
                }
            }
            catch (Exception ex)
            {
                SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
                return("添加失败请重新操作,错误代码:500 ");
            }
        }