//生成採購收穫上架工作單號 public HttpResponseBase CreateTallyList() { string json = String.Empty; json = "{success:false}"; IpoNvdQuery query = new IpoNvdQuery(); string id=string.Empty; try { if (!string.IsNullOrEmpty(Request.Params["id"])) { id = Request.Params["id"].ToString(); id = id.Substring(0, id.Length - 1).ToString(); query.modify_user = (Session["caller"] as Caller).user_id; } query.work_id = "IN" + DateTime.Now.ToString("yyyyMMddHHmmss"); if(!string.IsNullOrEmpty(id)) { _IpoNvdMgr = new IpoNvdMgr(mySqlConnectionString); int result = _IpoNvdMgr.CreateTallyList( query, id); if (result > 0) { json = "{success:true,work_id:\""+query.work_id+"\"}"; } } } catch (Exception ex) { Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage(); logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message); logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; log.Error(logMessage); json = "{success:false}"; } this.Response.Clear(); this.Response.Write(json); this.Response.End(); return this.Response; }