private string Create(HttpContext context) { try { SysLogBll.Create("检证书修改", "检证书修改", adminUser.AdminName); NCPEP.Bll.T_Jzs bll = new NCPEP.Bll.T_Jzs(); NCPEP.Model.T_Jzs model = new NCPEP.Model.T_Jzs(); try { model.beizhu = context.Request.Form["beizhu"].ToString(); } catch { } try { model.binid = context.Request.Form["Id"].ToString(); } catch { } model.cjje = context.Request.Form["cjje"].ToString(); model.htbh = context.Request.Form["htbh"].ToString(); model.zcdate = context.Request.Form["jzsStartDate"].ToString(); model.zcdatez = context.Request.Form["jzsEndDate"].ToString(); //int id = (int)dal.Create(GetModels(context)); int id = bll.Add(model); if (id > 0) { 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 "); } }
private DataTable GetAllListByYCJBuser(HttpContext context) { try { NCPEP.Dal.BidDal dal = new BidDal(); string sqlWhere = string.Empty; int startIndex = 0; try { startIndex = int.Parse(context.Request.Form["page"]) - 1; } catch { } int pageSize = 10; try { pageSize = int.Parse(context.Request.Form["rows"].ToString()); } catch { } string order = ""; if (context.Request.QueryString["BidName"] != null) { sqlWhere += string.Format(" and BidName like '%{0}%'", context.Request.QueryString["BidName"]); } sqlWhere += " and DepaStatus ='3' and StandardMode='2' and jbzt='1'"; if (model.JBYhm != null) { sqlWhere += " and jbyhm='" + model.JBYhm + "'"; } return(dal.GetAllListByDzjb(sqlWhere, startIndex, pageSize, order)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } }
public string strrequest(HttpContext context) { try { adminUser = context.Session["SuperAdminUserSession"] as AdminUser; if (null == adminUser) { if (!string.IsNullOrEmpty(context.Request.Cookies["AdminCookies"].Value)) { adminUser = new GetUserCookiesPlug().GetUserCookies(context.Request.Cookies["AdminCookies"]["SuperAdminUserCookies"]); context.Session["SuperAdminUserSession"] = adminUser; } } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } string action = context.Request.QueryString["action"].ToString(); string returnDate = string.Empty; switch (action) { case "add": returnDate = Create(context); break; default: returnDate = "请求错误!"; break; } return(returnDate); }
private string Create(HttpContext context) { try { SysLogBll.Create("项目备案添加", "项目备案添加", adminUser.AdminName); NCPEP.Bll.T_XmBeian bll = new NCPEP.Bll.T_XmBeian(); NCPEP.Model.T_XmBeian model = new NCPEP.Model.T_XmBeian(); model.beiyong = "1";//审核状态 model.beiyongb = ""; model.beizhu = context.Request.Form["beizhu"]; model.changjiaozongjia = context.Request.Form["zongjia"]; model.chengjiaodanjia = context.Request.Form["danjia"]; model.churangfang = context.Request.Form["crf"]; model.churangfangxingzhi = context.Request.Form["crfxz"]; model.cqleixing = context.Request.Form["Properties"]; model.cqname = context.Request.Form["BidName"]; model.cqquanshu = context.Request.Form["Ownership"]; model.danwei = context.Request.Form["gmdw"]; model.guimo = context.Request.Form["guimo"]; try { model.hetongjsrq = Convert.ToDateTime(DateTime.Parse(context.Request.Form["EndDate"].ToString()).ToString("yyyy年MM月dd日")); } catch { } try { model.hetongksrq = Convert.ToDateTime(DateTime.Parse(context.Request.Form["StartDate"].ToString()).ToString("yyyy年MM月dd日")); } catch { } model.jiaoyifangshi = context.Request.Form["StandardMode"]; model.shourangfang = context.Request.Form["srf"]; model.shourangfangxingzhi = context.Request.Form["srfxz"]; model.zhifufangshi = context.Request.Form["zffs"]; model.orgcode = context.Request.Form["OrgCode"]; //int id = (int)dal.Create(GetModels(context)); int id = bll.Add(model); if (id > 0) { 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 "); } }
protected void Page_Load(object sender, EventArgs e) { try { adminUser = Session["SuperAdminUserSession"] as AdminUser; if (null == adminUser) { if (!string.IsNullOrEmpty(Request.Cookies["AdminCookies"].Value)) { adminUser = new GetUserCookiesPlug().GetUserCookies(Request.Cookies["AdminCookies"]["SuperAdminUserCookies"]); Session["SuperAdminUserSession"] = adminUser; } } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); //return null; } if (!IsPostBack) { if (Request.QueryString["p"] != null) { string strid = Request.QueryString["p"]; NCPEP.Bll.T_Jzs bll = new NCPEP.Bll.T_Jzs(); DataTable dt = bll.GetList(" binid='" + Request.QueryString["p"] + "'").Tables[0]; if (dt.Rows.Count > 0) { try { this.txtbeizhu.Value = dt.Rows[0]["beizhu"].ToString(); } catch { } this.txtcjje.Value = dt.Rows[0]["cjje"].ToString(); this.txtEndDatejzs.Value = DateTime.Parse(dt.Rows[0]["zcdatez"].ToString()).ToString("yyyy-MM-dd"); this.txthtbh.Value = dt.Rows[0]["htbh"].ToString(); this.txtStartDatejzs.Value = DateTime.Parse(dt.Rows[0]["zcdate"].ToString()).ToString("yyyy-MM-dd"); try { this.txtzffs.Value = dt.Rows[0]["beiyong"].ToString(); } catch { } try { this.txtjydj.Value = dt.Rows[0]["beiyong2"].ToString(); } catch { } } } } }
// protected IScheduler sched; /// <summary> /// 调度计划主线程 0 59 22 * * ? /// </summary> public void Start() { try { /* ISchedulerFactory schedFact = new StdSchedulerFactory(); * IScheduler sched = schedFact.GetScheduler(); * //开始任务 * sched.Start(); * IJobDetail job = JobBuilder.Create<JobTrigger>().WithIdentity("myJob", "groupSid").Build(); * ITrigger trigger = TriggerBuilder.Create().WithIdentity("myTrigger", "groupSid") * .WithCronSchedule("0 0 2 * * ?") * .Build(); * sched.ScheduleJob(job, trigger);*/ } catch (Exception ex) { SystemErrorPlug.ErrorRecord(ex.ToString()); } }
private NCPEP.Model.T_XmBeian GetById(HttpContext context) { try { SysLogBll.Create("项目备案", "项目备案信息修改", adminUser.AdminName); int id = 0; try { id = int.Parse(context.Request.QueryString["Id"]); } catch { } NCPEP.Model.T_XmBeian model = new NCPEP.Model.T_XmBeian(); NCPEP.Bll.T_XmBeian bll = new NCPEP.Bll.T_XmBeian(); model = bll.GetModel(id); return(model); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } }
private string Update(HttpContext context) { try { SysLogBll.Create("项目备案", "更新项目备案信息", adminUser.AdminName); NCPEP.Model.T_XmBeian dModels = GetModels(context); NCPEP.Bll.T_XmBeian bll = new NCPEP.Bll.T_XmBeian(); if (bll.Update(dModels)) { 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 "); } }
private string Delete(HttpContext context) { try { SysLogBll.Create("项目备案", "删除项目备案信息操作", adminUser.AdminName); NCPEP.Bll.T_XmBeian bll = new NCPEP.Bll.T_XmBeian(); int id = 0; try { id = int.Parse(context.Request.QueryString["id"].ToString()); } catch { } if (bll.Delete(id)) { return("删除操作成功!"); } else { return("删除失败请重新操作,错误代码:500 "); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
protected void Button1_Click(object sender, EventArgs e) { AdminUser adminUser = Session["SuperAdminUserSession"] as AdminUser; if (this.FileUpload1.HasFile) { string strtype = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower();//ToLower转化为小写 if (strtype == ".jpg" || strtype == ".gif" || strtype == ".jpeg" || strtype == ".png" || strtype == ".pdf") { //获得上传文件的大小 int filesize = FileUpload1.PostedFile.ContentLength; if (filesize > 1024 * 1024 * 25) { MessageBox.Show(this, "你上传的文件太大!"); return; } else { NCPEP.Model.T_FujianBiao model = new NCPEP.Model.T_FujianBiao(); try { } catch { } try { model.fid = Request.QueryString["p"]; } catch { } model.fjdynameid = this.txtFK_UploadTypeIndicatorId.SelectedValue; string strname = Guid.NewGuid().ToString("N") + System.IO.Path.GetExtension(FileUpload1.FileName); string strpath = Server.MapPath("~/Super/Scan/bsrffujian/" + model.fid + ""); if (!System.IO.Directory.Exists(strpath)) { System.IO.Directory.CreateDirectory(strpath); } FileUpload1.SaveAs(strpath + "/" + strname); //string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/lt/" + model.FK_LiceTranId + "/", 0); //string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/lt/" + model.FK_LiceTranId + "/" + ImgName); //string pdfUrl = "~/Super/Scan/lt/" + model.FK_LiceTranId + "/"; //new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf"); model.fjpath = strname; model.fjname = adminUser.AdminName; model.fjlx = "4";//意向受让方申请附件 try { SysLogBll.Create("意向受让方申请附件", "增加标的意向受让方申请附件上传附件操作", adminUser.AdminName); NCPEP.Bll.T_FujianBiao bll = new NCPEP.Bll.T_FujianBiao(); if (bll.Add(model) > 0) { MessageBox.Show(this, "上传成功。"); BindFujian(Request.QueryString["p"]); } else { MessageBox.Show(this, "上传失败,请重新操作! "); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); MessageBox.Show(this, "添加失败请重新操作,错误代码:500 "); } } } else { MessageBox.Show(this, "上传的附件格式后缀名只能为.jpg,.gif,.jpeg,.png,.pdf,其他格式暂不允许上传"); return; } } else { MessageBox.Show(this, "请选择附件进行上传"); return; } }
public string strrequest(HttpContext context) { try { adminUser = context.Session["SuperAdminUserSession"] as AdminUser; if (null == adminUser) { if (!string.IsNullOrEmpty(context.Request.Cookies["AdminCookies"].Value)) { adminUser = new GetUserCookiesPlug().GetUserCookies(context.Request.Cookies["AdminCookies"]["SuperAdminUserCookies"]); context.Session["SuperAdminUserSession"] = adminUser; } } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } string action = context.Request.QueryString["action"].ToString(); string returnDate = string.Empty; switch (action) { case "add": returnDate = Create(context); break; case "paging": string str2 = "\"total\":" + Getlist(context).Rows.Count + ","; returnDate = JsonConverterwh.ToJson(Getlist(context), "rows").Insert(1, (str2)); break; case "pagingxx": string str = "\"total\":" + Getlistxx(context).Rows.Count + ","; returnDate = JsonConverterwh.ToJson(Getlistxx(context), "rows").Insert(1, (str)); break; case "del": returnDate = Delete(context); break; case "by": returnDate = JsonHelper <NCPEP.Model.T_XmBeian> .JsonWriter(GetById(context)); break; case "up": returnDate = Update(context); break; case "shenhe": returnDate = Shenhe(context); break; case "shenheSC": returnDate = ShenheSC(context); break; default: returnDate = "请求错误!"; break; } return(returnDate); }