protected void save_add_Click(object sender, EventArgs e) { var param = GetParam(); if (param == null) { ClientScript.RegisterStartupScript(this.GetType(), "错误提示", $"<script>alert('必填参数丢失');</script>"); return; } var result = new DispatchBLL().AddQuickCall(param, LoginUserId); ClientScript.RegisterStartupScript(this.GetType(), "刷新父页面", $"<script>self.opener.location.reload();</script>"); ClientScript.RegisterStartupScript(this.GetType(), "提示信息", $"<script>alert('保存{(result ? "成功" : "失败")}!');location.href='../ServiceDesk/TicketView.aspx?id={param.thisTicket.id.ToString()}';</script>"); }
protected void save_close_Click(object sender, EventArgs e) { var param = GetParam(); if (param == null) { ClientScript.RegisterStartupScript(this.GetType(), "错误提示", $"<script>alert('必填参数丢失');</script>"); return; } var result = new DispatchBLL().AddQuickCall(param, LoginUserId); ClientScript.RegisterStartupScript(this.GetType(), "刷新父页面", $"<script>self.opener.location.reload();</script>"); ClientScript.RegisterStartupScript(this.GetType(), "提示信息", $"<script>alert('保存{(result ? "成功" : "失败")}!');window.close();</script>"); }
/// <summary> /// 新增编辑快速查询记录 /// </summary> public void SearchHistoryManage(HttpContext context) { var result = false; var id = context.Request.QueryString["id"]; if (!string.IsNullOrEmpty(id)) { var search = new DAL.sys_recent_search_dal().FindById(long.Parse(id)); if (search != null) { result = new DispatchBLL().ManageSearch(search, LoginUserId); } } else { var searchText = context.Request.QueryString["searchText"]; var searchType = context.Request.QueryString["searchType"]; var searchTypeName = context.Request.QueryString["searchTypeName"]; var url = context.Request.QueryString["url"]; var searchDto = new DTO.QuickSearchDto() { Condition = searchText, Name = searchTypeName, SearchType = searchType }; var conditions = new Tools.Serialize().SerializeJson(searchDto); var search = new DAL.sys_recent_search_dal().GetByCon(conditions, url); if (search != null) { result = new DispatchBLL().ManageSearch(search, LoginUserId); } else { search = new Core.sys_recent_search() { conditions = conditions, url = url, title = "", }; result = new DispatchBLL().ManageSearch(search, LoginUserId); } } context.Response.Write(new Tools.Serialize().SerializeJson(result)); }
public override string Deal() { StringBuilder msg = new StringBuilder(); try { Thread.Sleep(5000); OCRX.BLL.DispatchBLL bll = new DispatchBLL(); string msg2 = bll.DealSuccessWithLinecode(); if (!string.IsNullOrEmpty(msg2)) { AddResult(msg2); } string msg3 = bll.DealSuccessWithoutLinecode(); if (!string.IsNullOrEmpty(msg3)) { AddResult(msg3); } string msg1 = bll.DealExOnly(); if (!string.IsNullOrEmpty(msg1)) { AddResult(msg1); } //if (string.IsNullOrEmpty(msg1) && string.IsNullOrEmpty(msg2) && string.IsNullOrEmpty(msg3)) //{ // AddResult("数据分发 无记录"); //} } catch (Exception ex) { AddResult(string.Format("数据分发 {0}", ex.Message)); } return(msg.ToString()); }
protected void save_add_Click(object sender, EventArgs e) { var param = Getparam(); if (param == null) { return; } var result = false; if (isAdd) { result = new DispatchBLL().AddAppointment(param, LoginUserId); } else { result = new DispatchBLL().EditAppointment(param, LoginUserId); } ClientScript.RegisterStartupScript(this.GetType(), "刷新父页面", $"<script>self.opener.location.reload();</script>"); ClientScript.RegisterStartupScript(this.GetType(), "提示信息", $"<script>alert('保存{(result ? "成功" : "失败")}!');location.href='AppointmentsManage';</script>"); }