コード例 #1
0
        public ActionResult FCHandleSubmit(T_GW_MarkInfo tgm)//数据库
        {
            var    uploadfile  = this.GetCmp <FileUploadField>("filehandleup");
            int    filesize    = uploadfile.PostedFile.ContentLength;
            string fileoldname = uploadfile.FileName;

            if (filesize > 20 * 1024 * 1024)
            {
                X.Msg.Alert("提示", "上传文件过大,大小必须低于20M").Show();
                return(this.Direct());
            }
            if (uploadfile.HasFile)
            {
                string filenewname = Guid.NewGuid().ToString() + Path.GetExtension(fileoldname);
                string logicpath   = "~/AttachFile/WorkYard/ExceptionHandle/" + filenewname;
                string filepath    = Server.MapPath(logicpath);
                tgm.HandlePicPath = logicpath;
                uploadfile.PostedFile.SaveAs(filepath);
            }

            tgm.IsHandled   = "已处理";
            tgm.HandleMan   = user.EmployeeName;
            tgm.AuditResult = "未审核";
            tgm.HandleTime  = DateTime.Now;
            DB.T_GW_MarkInfo.Attach(tgm);
            DB.Entry(tgm).State = EntityState.Modified;
            DB.SaveChanges();
            return(this.Direct());
        }
コード例 #2
0
        public ActionResult ClickSubmit(string mark, string extra, float x, float y)
        {
            var markinfo = new T_GW_MarkInfo();

            markinfo.Mark   = mark;
            markinfo.Remark = extra;
            markinfo.Xaxes  = x;
            markinfo.Yaxes  = y;
            DB.T_GW_MarkInfo.Add(markinfo);
            DB.SaveChanges();
            return(this.Direct());
        }
コード例 #3
0
 public ActionResult FCAuditSubmit(T_GW_MarkInfo tgma, string asu)//数据库
 {
     tgma.AuditResult = asu;
     if (asu == "审核驳回")
     {
         tgma.IsHandled = "未处理";
     }
     tgma.AuditMan  = user.EmployeeName;
     tgma.AuditTime = DateTime.Now;
     DB.T_GW_MarkInfo.Attach(tgma);
     DB.Entry(tgma).State = EntityState.Modified;
     DB.SaveChanges();
     return(this.Direct());
 }
コード例 #4
0
        public ActionResult FCAddSubmit(string wl1, string ma1, string ed1, string es1, string rm1)
        {
            var    markinfo    = new T_GW_MarkInfo();
            var    uploadfile  = this.GetCmp <FileUploadField>("fileup");
            int    filesize    = uploadfile.PostedFile.ContentLength;
            string fileoldname = uploadfile.FileName;

            if (filesize > 20 * 1024 * 1024)
            {
                X.Msg.Alert("提示", "上传文件过大,大小必须低于20M").Show();
                return(this.Direct());
            }
            if (uploadfile.HasFile)
            {
                string filenewname = Guid.NewGuid().ToString() + Path.GetExtension(fileoldname);
                string logicpath   = "~/AttachFile/WorkYard/ExceptionMark/" + filenewname;
                string filepath    = Server.MapPath(logicpath);
                markinfo.ExcPicPath = logicpath;
                uploadfile.PostedFile.SaveAs(filepath);
            }

            markinfo.IsHandled          = "未处理";
            markinfo.AuditResult        = "未审核";
            markinfo.ReportMan          = user.EmployeeName;
            markinfo.ReportTime         = DateTime.Now;
            markinfo.ProjectNo          = pronoadd;
            markinfo.WorkPlace          = filednameadd;
            markinfo.Xaxes              = xaxes;
            markinfo.Yaxes              = yaxes;
            markinfo.WarnLevel          = wl1;
            markinfo.ExceptionDes       = ed1;
            markinfo.ExceptionHandleSug = es1;
            markinfo.Mark   = ma1;
            markinfo.Remark = rm1;
            DB.T_GW_MarkInfo.Add(markinfo);
            DB.SaveChanges();
            return(this.Direct());
        }