Exemple #1
0
        /// <summary>
        /// 修改审批信息
        /// </summary>
        /// <returns></returns>
        public int ModifyApproveInf(LicenseModel model)
        {
            using (Entities db = new Entities())
            {
                xz_licensings lic_model = db.xz_licensings.FirstOrDefault(a => a.licensingid == model.licensingid);
                if (lic_model != null)
                {
                    lic_model.xksx              = model.xksx;
                    lic_model.splx              = model.splx;
                    lic_model.b_address         = model.b_address;
                    lic_model.sxmx              = model.sxmx;
                    lic_model.sqr               = model.sqr;
                    lic_model.cardtype          = model.cardtype;
                    lic_model.card              = model.card;
                    lic_model.contactphone      = model.contactphone;
                    lic_model.s_address         = model.s_address;
                    lic_model.processtime_start = model.processtime_start;
                    lic_model.processtime_end   = model.processtime_end;
                    lic_model.processcontent    = model.processcontent;
                    lic_model.processaddress    = model.processaddress;
                    lic_model.geography         = model.geography;
                    lic_model.issh              = 0;

                    lic_model.shresult  = model.shresult;
                    lic_model.shuser    = model.createuserid;
                    lic_model.shopinion = "";
                    lic_model.shtime    = DateTime.Now;
                    return(db.SaveChanges());
                }
                else
                {
                    return(0);
                }
            }
        }
Exemple #2
0
 /// <summary>
 /// 提交审批处理意见
 /// </summary>
 /// <returns></returns>
 public int AddDealAdvice(LicenseModel model)
 {
     using (Entities db = new Entities())
     {
         xz_licensings lic_model = db.xz_licensings.FirstOrDefault(a => a.licensingid == model.licensingid);
         if (lic_model != null)
         {
             lic_model.shresult   = model.shresult;
             lic_model.shopinion  = model.shopinion;
             lic_model.issh       = 1;
             lic_model.createtime = DateTime.Now;
             return(db.SaveChanges());
         }
         else
         {
             return(0);
         }
     }
 }
Exemple #3
0
        /// <summary>
        /// 添加审批信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddApproveInf(LicenseModel model, List <FileClass> list)
        {
            bool info = false, file = false;

            using (Entities db = new Entities())
            {
                xz_licensings lic_model = new xz_licensings();
                lic_model.sph               = Convert.ToInt32(DateTime.Now.ToString("MMddHHmmss"));
                lic_model.xksx              = model.xksx;
                lic_model.splx              = model.splx;
                lic_model.b_address         = model.b_address;
                lic_model.sxmx              = model.sxmx;
                lic_model.sqr               = model.sqr;
                lic_model.cardtype          = model.cardtype;
                lic_model.card              = model.card;
                lic_model.contactphone      = model.contactphone;
                lic_model.s_address         = model.s_address;
                lic_model.processtime_start = model.processtime_start;
                lic_model.processtime_end   = model.processtime_end;
                lic_model.processcontent    = model.processcontent;
                lic_model.processaddress    = model.processaddress;
                lic_model.geography         = model.geography;
                lic_model.createuserid      = model.createuserid;
                lic_model.createtime        = DateTime.Now;
                lic_model.issh              = 0;

                if (model != null)
                {
                    string id = model.splx;
                    //model.splx = Convert.ToString(base_model.GetTypeById(id, "type_splx")[id]);
                    lic_model.splx = model.splx;
                    id             = model.cardtype;
                    //model.cardtype = Convert.ToString(base_model.GetTypeById(id, "type_xzxk_zjlx")[id]);
                    lic_model.cardtype = model.cardtype;
                }

                //审核意见默认值
                lic_model.shresult  = 1;
                lic_model.shuser    = model.createuserid;
                lic_model.shopinion = "";
                lic_model.shtime    = DateTime.Now;

                db.xz_licensings.Add(lic_model);
                if (db.SaveChanges() > 0)
                {
                    info = true;
                }

                foreach (var item in list)
                {
                    xzj_files filemodel = new xzj_files();
                    filemodel.source   = 2; //1 门前三包  2行政许可
                    filemodel.filename = item.OriginalName;
                    filemodel.filepath = item.OriginalPath;
                    filemodel.filesize = item.size;
                    filemodel.filetype = item.OriginalType;
                    filemodel.sourceid = lic_model.licensingid;

                    db.xzj_files.Add(filemodel);
                }

                if (db.SaveChanges() > 0)
                {
                    file = true;
                }

                if (info && file)
                {
                    return(1);
                }
                else
                {
                    return(0);
                }
            }
        }