private string checkProductHouse(string check) { string auditor = ToolCode.Tool.GetUser().UserNumber; //string CheckTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); //string error = string.Empty; //string sql = string.Format(@" update ProductWarehouseLog set Auditor='{0}' , CheckTime='{1}' where WarehouseNumber in ({2})", // Auditor, CheckTime, check); //return SqlHelper.ExecuteSql(sql, ref error) == true ? "1" : error; return(StoreroomToolManager.AutiorProductWarehouseLog(check, auditor)); }
protected void Page_Load(object sender, EventArgs e) { string requestString = ToolManager.GetRequestString("Action"); if (requestString != null) { if (!(requestString == "Save")) { if (requestString == "Get") { this.Get(); } else if (requestString == "Delete") { this.Delete(); } else if (requestString == "Autior") { string str2 = string.Empty; try { string auditor = ToolCode.Tool.GetUser().UserNumber; string number = "'" + Request["WarehouseNumber"] + "'"; string tempResult = StoreroomToolManager.AutiorProductWarehouseLog(number, auditor); if (!tempResult.Equals("1")) { str2 = JsonConvert.SerializeObject(new { Status = false, Msg = tempResult }); } else { str2 = JsonConvert.SerializeObject(new { Status = true, Msg = string.Empty }); } base.Response.Write(str2); HttpContext.Current.ApplicationInstance.CompleteRequest(); } catch (Exception exception) { str2 = JsonConvert.SerializeObject(new { Status = false, Msg = exception.Message }); base.Response.Write(str2); HttpContext.Current.ApplicationInstance.CompleteRequest(); } } } else { this.Save(); } } }
protected void btnCheck_Click(object sender, EventArgs e) { string auditor = ToolCode.Tool.GetUser().UserNumber; string number = "'" + ToolManager.GetQueryString("WarehouseNumber") + "'"; string result = StoreroomToolManager.AutiorProductWarehouseLog(number, auditor); if (result.Equals("1")) { Response.Redirect("ProductWarehouseLogList.aspx"); } else { lbSubmit.Text = "审核失败!原因:" + result; } }