protected void save_close_Click(object sender, EventArgs e) { var para = GetParam(); if (para != null) { string faileReason; var result = false; if (isAdd) { result = new TicketBLL().AddTicket(para, LoginUserId, out faileReason); } else { result = new TicketBLL().EditTicket(para, LoginUserId, out faileReason); } if (!string.IsNullOrEmpty(CallBack)) { ClientScript.RegisterStartupScript(this.GetType(), "提示信息", $"<script>alert('保存{(result ? "成功" : "失败")}');self.opener.{CallBack}('{para.ticket.id}');window.close();</script>"); } else { // 跳转到查看页面 暂时关闭 ClientScript.RegisterStartupScript(this.GetType(), "提示信息", $"<script>alert('保存{(result?"成功":"失败")}');self.opener.location.reload();window.close();</script>"); } } }
/// <summary> /// 重新打开操作 /// </summary> protected void btnRepeat_Click(object sender, EventArgs e) { // 获取保存类型,进行相关操作 var saveType = Request.Form["SaveType"]; var para = GetParam(); if (para != null) { string faileReason; var result = false; if (isAdd) { result = new TicketBLL().AddTicket(para, LoginUserId, out faileReason); } else { result = new TicketBLL().EditTicket(para, LoginUserId, out faileReason); } if (!string.IsNullOrEmpty(CallBack)) { } else { // 跳转到查看页面 ClientScript.RegisterStartupScript(this.GetType(), "提示信息", $"<script>alert('保存{(result?"成功":"失败")}');self.opener.location.reload();location.href='TicketManage?id=" + para.ticket.id + "';</script>"); } } }
/// <summary> /// 工单审批信息管理 /// </summary> private void TicketOtherManage(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; var boardId = context.Request.QueryString["board_id"]; long?board_id = null; if (!string.IsNullOrEmpty(boardId)) { board_id = long.Parse(boardId); } var appTypeId = context.Request.QueryString["app_type_id"]; int app_type_id = (int)DTO.DicEnum.APPROVAL_TYPE.ALL_APPROVERS_MUST_APPROVE; if (string.IsNullOrEmpty(appTypeId)) { app_type_id = (int)DTO.DicEnum.APPROVAL_TYPE.ONE_APPROVER_MUST_APPROVE; } var oldResIds = context.Request.QueryString["old_res_ids"]; var newResIds = context.Request.QueryString["new_res_ids"]; var isAdd = context.Request.QueryString["is_add"]; var result = false; if (!string.IsNullOrEmpty(isAdd)) { result = new TicketBLL().AddTicketOther(long.Parse(ticketId), board_id, app_type_id, newResIds, LoginUserId); } else { result = new TicketBLL().EditTicketOther(long.Parse(ticketId), board_id, app_type_id, oldResIds, newResIds, LoginUserId); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(result)); }
/// <summary> /// 完成操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnComplete_Click(object sender, EventArgs e) { // 获取保存类型,进行相关操作 var saveType = Request.Form["SaveType"]; var para = GetParam(); if (para != null) { string faileReason; var result = false; if (isAdd) { result = new TicketBLL().AddTicket(para, LoginUserId, out faileReason); } else { result = new TicketBLL().EditTicket(para, LoginUserId, out faileReason); } if (result) { if (!string.IsNullOrEmpty(CallBack)) { } else { // 跳转到查看页面 暂时关闭 ClientScript.RegisterStartupScript(this.GetType(), "提示信息", "<script>alert('保存成功');self.opener.location.reload();window.close();</script>"); } } else { } } }
protected void save_modify_Click(object sender, EventArgs e) { var param = GetParam(); var faileReason = ""; var result = false; if (isAdd) { result = new TicketBLL().AddTicketLabour(param, LoginUserId, ref faileReason); } else { result = new TicketBLL().EditTicketLabour(param, LoginUserId, ref faileReason); } ClientScript.RegisterStartupScript(this.GetType(), "提示信息", "<script>alert('保存" + (result ? "成功" : "失败") + "!');location.href='TicketModify?ticketIds=" + param.ticketId.ToString() + "';</script>"); var parFunc = Request.QueryString["noFunc"]; if (!string.IsNullOrEmpty(parFunc)) { ClientScript.RegisterStartupScript(this.GetType(), "父窗口事件", $"<script>self.opener.location.{parFunc}();</script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "父窗口事件", $"<script>self.opener.location.reload();</script>"); } }
public VyController(TicketBLL ticketBll, DepartureBLL departureBll, StationBLL stationBll, UserBLL userBll) { _ticketBll = ticketBll; _departureBll = departureBll; _stationBll = stationBll; _userBll = userBll; }
private void SaveTicket(Ticket ticket) { TicketBLL tbll = new TicketBLL(); tbll.Insert(ticket); //后面主要是TicketDAL.Insert(Ticket ticket) }
//显示某部电影的已售 private void ShowSoldPositonsByPlayId() { TicketBLL tbll = new TicketBLL(); var lstPositions = tbll.GetSoldPositionsByPlayId(this.selPlay.Id); ShowSoldPositonsByListPositions(lstPositions); }
public JournalFormPresenter(JournalForm form, TicketBLL ticket) { this.form = form; validator = new FormValidator(); userTicket = ticket; getServices(); reloadRequestsGrid(); }
public PasswordFormPresenter(PasswordForm form, TicketBLL ticket) { this.form = form; user = ticket; validator = new FormValidator(); serviceFactory = new ServiceFactory(new PGRepositoryFactory()); service = serviceFactory.getUserService(); }
/// <summary> /// 获取到该服务预定下的工单Id /// </summary> private void GetCallTicketIds(HttpContext context) { var callId = context.Request.QueryString["callId"]; var ids = ""; if (!string.IsNullOrEmpty(callId)) { ids = new TicketBLL().GetCallTicketIds(long.Parse(callId)); } context.Response.Write(ids); }
/// <summary> /// 根据Id 删除相关工单 /// </summary> private void DeleteTicketByIds(HttpContext context) { var ids = context.Request.QueryString["ids"]; var result = false; if (!string.IsNullOrEmpty(ids)) { result = new TicketBLL().DeleteTicketByIds(ids, LoginUserId); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(result)); }
/// <summary> /// 删除服务预定 /// </summary> private void DeleteCall(HttpContext context) { var callId = context.Request.QueryString["callId"]; var result = false; if (!string.IsNullOrEmpty(callId)) { result = new TicketBLL().DeleteCall(long.Parse(callId), LoginUserId); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(result)); }
public PasswordForm(TicketBLL ticket) { InitializeComponent(); presenter = new PasswordFormPresenter(this, ticket); tbOldPwd.PasswordChar = '*'; tbNewPwd.PasswordChar = '*'; if (LoginInfo.isKomendant()) { tbOldPwd.Enabled = false; } }
/// <summary> /// 获取该工单下的所有未开始的工单Id /// </summary> private void GetFutureIds(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; string ids = ""; if (!string.IsNullOrEmpty(ticketId)) { ids = new TicketBLL().GetFutureIds(long.Parse(ticketId)); } context.Response.Write(ids); }
/// <summary> /// 撤销申请审批 /// </summary> private void RevokeAppOther(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; var result = false; if (!string.IsNullOrEmpty(ticketId)) { result = new TicketBLL().RevokeAppOther(long.Parse(ticketId), LoginUserId); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(result)); }
/// <summary> /// 关联事故 /// </summary> /// <param name="context"></param> private void RelaIncident(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; var relaTicketId = context.Request.QueryString["rela_ticket_ids"]; var result = false; if (!string.IsNullOrEmpty(ticketId) && !string.IsNullOrEmpty(relaTicketId)) { result = new TicketBLL().RelaIncident(long.Parse(ticketId), relaTicketId, LoginUserId, !string.IsNullOrEmpty(context.Request.QueryString["change_account"])); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(result)); }
/// <summary> /// 工单周期状态管理 /// </summary> private void RecStatusManage(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; var isActive = context.Request.QueryString["is_active"]; bool result = false; if (!string.IsNullOrEmpty(ticketId) && !string.IsNullOrEmpty(isActive)) { result = new TicketBLL().RecTicketActiveManage(long.Parse(ticketId), isActive == "1", LoginUserId); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(result)); }
/// <summary> /// 改变检查单的完成状态 /// </summary> private void ChangeCheckComplete(HttpContext context) { var ckId = context.Request.QueryString["check_id"]; var isComplete = context.Request.QueryString["is_com"]; var result = false; if (!string.IsNullOrEmpty(ckId) && !string.IsNullOrEmpty(isComplete)) { result = new TicketBLL().ChangeCheckIsCom(long.Parse(ckId), isComplete == "1", LoginUserId); } context.Response.Write(result); }
/// <summary> /// 删除工单 /// </summary> private void DeleteTicket(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; if (!string.IsNullOrEmpty(ticketId)) { string faileReason; var result = new TicketBLL().DeleteTicket(long.Parse(ticketId), LoginUserId, out faileReason); // 返回结果和失败原因 context.Response.Write(new EMT.Tools.Serialize().SerializeJson(new { result = result, reason = faileReason, })); } }
/// <summary> /// 标记为问题 /// </summary> private void SignAsIssue(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; var reason = ""; var result = false; if (!string.IsNullOrEmpty(ticketId)) { result = new TicketBLL().SignAsIssue(long.Parse(ticketId), LoginUserId, ref reason); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(new { result = result, reason = reason, })); }
public JournalForm(TicketBLL ticket) { InitializeComponent(); presenter = new JournalFormPresenter(this, ticket); prepareView(); DGV.MultiSelect = false; DGV.ReadOnly = true; fillDateComboBoxes(); presenter.setCurrentDate(); списокЗаявленийToolStripMenuItem.Checked = true; tbDescription.MaxLength = 50; }
/// <summary> /// 删除定期主工单 /// </summary> private void DeleteMasterTicket(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; var isDeletfuture = context.Request.QueryString["delete_future"]; if (!string.IsNullOrEmpty(ticketId)) { Dictionary <string, int> subResult = new Dictionary <string, int>(); bool result = false; result = new TicketBLL().DeleteMaster(long.Parse(ticketId), LoginUserId, !string.IsNullOrEmpty(isDeletfuture), ref subResult, !string.IsNullOrEmpty(context.Request.QueryString["not_delete"])); context.Response.Write(new EMT.Tools.Serialize().SerializeJson(new { result = result, dic = subResult })); } }
/// <summary> /// 合并工单 /// </summary> private void MergeTicket(HttpContext context) { var fromTicketId = context.Request.QueryString["from_ticket_id"]; var toTicketId = context.Request.QueryString["to_ticket_id"]; var reason = ""; var result = false; if (!string.IsNullOrEmpty(fromTicketId) && !string.IsNullOrEmpty(toTicketId)) { result = new TicketBLL().MergeTicket(long.Parse(toTicketId), long.Parse(fromTicketId), LoginUserId, ref reason); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(new { result = result, reason = reason, })); }
/// <summary> /// 吸收工单 /// </summary> private void AbsorbTicket(HttpContext context) { var ticketId = context.Request.QueryString["to_ticket_id"]; var fromIds = context.Request.QueryString["from_ticket_ids"]; var result = false; // var faileReason = ""; if (!string.IsNullOrEmpty(ticketId) && !string.IsNullOrEmpty(fromIds)) { result = new TicketBLL().MergeTickets(long.Parse(ticketId), fromIds, LoginUserId); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(result)); }
/// <summary> /// 根据选择的日期获取相应类名, /// </summary> public string ReturnClassName(DateTime chooseDate, DateTime thisDay, long userId) { // 过期 Overlap // 有待办 预定~ Important // 今天 Today // 本月天数无信息 "" string className = ""; if (thisDay.Year != chooseDate.Year || thisDay.Month != chooseDate.Month) { className += "Overlap "; } if (thisDay.Year == DateTime.Now.Year && thisDay.Month == DateTime.Now.Month && thisDay.Day == DateTime.Now.Day) { className += "Today "; } var dBll = new DispatchBLL(); var appList = dBll.GetAppByResDate(userId, thisDay); if (appList != null && appList.Count > 0) { className += "Important"; return(className); } var todoList = new ActivityBLL().GetToListByResDate(userId, thisDay); if (todoList != null && todoList.Count > 0) { className += "Important"; return(className); } var callList = new TicketBLL().GetCallByResDate(userId, thisDay); if (callList != null && callList.Count > 0) { className += "Important"; return(className); } var timeList = new TimeOffPolicyBLL().GetTimeOffByResDate(userId, thisDay); if (timeList != null && timeList.Count > 0) { className += "Important"; return(className); } return(className); }
protected void Page_Load(object sender, EventArgs e) { try { var ticketIds = Request.QueryString["ticketIds"]; if (!IsPostBack) { if (!string.IsNullOrEmpty(ticketIds)) { ticketList = new sdk_task_dal().GetTicketByIds(ticketIds); } if (ticketList == null || ticketList.Count == 0) { Response.Write($"<script>alert('未查询到相关工单信息');window.close();</script>"); } else if (ticketList.Count == 0) { thisAccount = new CompanyBLL().GetCompany(ticketList[0].account_id); } } else { var accountId = Request.Form["accountId"]; var projectId = Request.Form["projectId"]; var departmentId = Request.Form["departmentId"]; long?phaseId = null; if (!string.IsNullOrEmpty(Request.Form["phaseId"])) { phaseId = long.Parse(Request.Form["phaseId"]); } if (!string.IsNullOrEmpty(accountId) && !string.IsNullOrEmpty(projectId) && !string.IsNullOrEmpty(departmentId)) { var result = new TicketBLL().CopyToProject(ticketIds, long.Parse(projectId), long.Parse(departmentId), phaseId, LoginUserId); ClientScript.RegisterStartupScript(this.GetType(), "提示信息", $"<script>alert('保存{(result ? "成功" : "失败")}!');self.opener.location.reload();window.close();</script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "提示信息", $"<script>alert('必填参数丢失');</script>"); } } } catch (Exception msg) { Response.Write($"<script>alert('{msg.Message}');window.close();</script>"); } }
/// <summary> /// 快速新增备注 /// </summary> private void AddTicketNote(HttpContext context) { var ticket_id = context.Request.QueryString["ticket_id"]; var isInter = !string.IsNullOrEmpty(context.Request.QueryString["is_inter"]); var notiContacr = !string.IsNullOrEmpty(context.Request.QueryString["noti_contact"]); var notiPriRes = !string.IsNullOrEmpty(context.Request.QueryString["noti_pri_res"]); var notiIntAll = !string.IsNullOrEmpty(context.Request.QueryString["noti_inter_all"]); var ticketNoteType = context.Request.QueryString["ticket_note_type_id"]; var noteDesc = context.Request.QueryString["ticket_note_desc"]; var result = false; if (!string.IsNullOrEmpty(ticket_id) && !string.IsNullOrEmpty(noteDesc) && !string.IsNullOrEmpty(ticketNoteType)) { var notiEmail = new TicketBLL().GetNotiEmail(long.Parse(ticket_id), notiContacr, notiPriRes, notiIntAll); result = new TicketBLL().SimpleAddTicketNote(long.Parse(ticket_id), LoginUserId, int.Parse(ticketNoteType), noteDesc, isInter, notiEmail); } context.Response.Write(result); }
/// <summary> /// 审批负责人管理 /// </summary> private void OtherPersonManage(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; var isApp = context.Request.QueryString["is_app"]; var reason = context.Request.QueryString["reason"]; var result = false; if (!string.IsNullOrEmpty(ticketId)) { int app = (int)DTO.DicEnum.CHANGE_APPROVE_STATUS_PERSON.REJECTED; if (!string.IsNullOrEmpty(isApp)) { app = (int)DTO.DicEnum.CHANGE_APPROVE_STATUS_PERSON.APPROVED; } result = new TicketBLL().OtherPersonManage(long.Parse(ticketId), app, reason, LoginUserId); } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(result)); }
private void BuscarCButton_Click(object sender, EventArgs e) { dataGridView1.DataSource = PersonaBLL.GetList(filter); dataGridView1.DataSource = TicketBLL.GetList(filterT); if (PersonaBLL.GetList(filter) != null) { dataGridView1.Columns["Edad"].Visible = false; dataGridView1.Columns["Fecha"].Visible = false; dataGridView1.Columns["Direccion"].Visible = false; } if (TicketBLL.GetList(filterT) != null) { dataGridView1.Columns["Id"].Visible = false; dataGridView1.Columns["PersId"].Visible = false; } }