protected void Page_Load(object sender, EventArgs e) { try { var insProId = Request.QueryString["insProId"]; var contractId = Request.QueryString["contractId"]; if (!string.IsNullOrEmpty(insProId) && !string.IsNullOrEmpty(contractId)) { iProduct = new crm_installed_product_dal().FindNoDeleteById(long.Parse(insProId)); serviceList = new ctt_contract_service_dal().GetConSerList(long.Parse(contractId)); contract = new ctt_contract_dal().FindNoDeleteById(long.Parse(contractId)); if (iProduct != null && serviceList != null && serviceList.Count > 0) { } } if (contract == null || iProduct == null) { Response.Write("<script>alert('未获取到相关配置项,合同信息');window.close();</script>"); } } catch (Exception error) { Response.Write("<script>alert('" + error.Message + "');window.close();</script>"); } }
protected void Page_Load(object sender, EventArgs e) { var insProId = Request.QueryString["insProId"]; long id = 0; if (!string.IsNullOrEmpty(insProId) && long.TryParse(insProId, out id)) { thisInsPro = insProBll.GetById(id); } if (thisInsPro == null) { Response.Write("<script>alert('未获取到相关配置项!');window.close();</script>"); return; } noCloseTicket = new DAL.sdk_task_dal().GetNoDoneByInsPro(thisInsPro.id); thisProduct = new ProductBLL().GetProduct(thisInsPro.product_id); wareList = new DAL.ivt_warehouse_dal().GetAllWareList(); if (thisInsPro.account_id != null) { thisAccount = new CompanyBLL().GetCompany((long)thisInsPro.account_id); contactList = new ContactBLL().GetContactByCompany((long)thisInsPro.account_id); } if (thisInsPro.contract_id != null) { thisContract = new ContractBLL().GetContract((long)thisInsPro.contract_id); } var thisSubAllList = new DAL.crm_subscription_dal().GetSubByInsProId(thisInsPro.id); thisSubList = new InstalledProductBLL().ReturnSubIds(thisSubAllList); if (thisSubList != null && thisSubList.Count > 0) { thisSubList.ForEach(_ => { subNames += _.name + ','; }); if (!string.IsNullOrEmpty(subNames)) { subNames = subNames.Substring(0, subNames.Length - 1); } } if (IsPostBack) { var result = new InstalledProductBLL().SwapConfigItem(GetParam(), LoginUserId); Response.Write($"<script>self.opener.location.reload();alert('替换{(result?"成功":"失败")}!');window.close();</script>"); } }
protected void Page_Load(object sender, EventArgs e) { var insProId = Request.QueryString["insProId"]; long id; if (!string.IsNullOrEmpty(insProId) && long.TryParse(insProId, out id)) { insPro = new DAL.crm_installed_product_dal().FindNoDeleteById(id); } if (insPro != null) { product = new DAL.ivt_product_dal().FindNoDeleteById(insPro.product_id); } else { Response.Write("<script>alert('未获取到相关配置项!');window.close();</script>"); return; } }
protected void Page_Load(object sender, EventArgs e) { var contratId = Request.QueryString["contractId"]; var seviceId = Request.QueryString["serviceId"]; var insProId = Request.QueryString["insProId"]; if (!string.IsNullOrEmpty(contratId)) { contract = new ContractBLL().GetContract(long.Parse(contratId)); } if (!string.IsNullOrEmpty(insProId)) { insPro = new crm_installed_product_dal().FindNoDeleteById(long.Parse(insProId)); } if (!string.IsNullOrEmpty(seviceId)) { contractService = new ctt_contract_service_dal().FindNoDeleteById(long.Parse(seviceId)); } if (contractService == null || contract == null || insPro == null) { Response.Write("<script>alert('未获取到相关配置项,合同信息');window.close();</script>"); return; } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { Bind(); // 绑定页面下拉数据 } CallBack = Request.QueryString["CallBack"]; var accountId = Request.QueryString["account_id"]; if (!string.IsNullOrEmpty(accountId)) { thisAccount = new CompanyBLL().GetCompany(long.Parse(accountId)); } var contractId = Request.QueryString["contract_id"]; if (!string.IsNullOrEmpty(contractId)) { thisContract = new ctt_contract_dal().FindNoDeleteById(long.Parse(contractId)); } var insProId = Request.QueryString["insProId"]; if (!string.IsNullOrEmpty(insProId)) { insPro = new crm_installed_product_dal().FindNoDeleteById(long.Parse(insProId)); if (insPro != null && insPro.account_id != null) { thisAccount = new CompanyBLL().GetCompany((long)insPro.account_id); } } var taskId = Request.QueryString["id"]; if (!string.IsNullOrEmpty(taskId)) { thisTicket = new sdk_task_dal().FindNoDeleteById(long.Parse(taskId)); if (thisTicket != null) { thisBookMark = new IndexBLL().GetSingBook(Request.RawUrl, LoginUserId); var isCopyString = Request.QueryString["isCopy"]; if (string.IsNullOrEmpty(isCopyString)) { isAdd = false; } else { isCopy = true; } if (!IsPostBack) { cate_id.ClearSelection(); cate_id.SelectedValue = thisTicket.cate_id.ToString(); this.ticket_type_id.SelectedValue = thisTicket.ticket_type_id.ToString(); this.status_id.SelectedValue = thisTicket.status_id.ToString(); if (isCopy) { this.status_id.ClearSelection(); this.status_id.SelectedValue = ((int)DicEnum.TICKET_STATUS.NEW).ToString(); } if (thisTicket.priority_type_id != null) { priority_type_id.SelectedValue = thisTicket.priority_type_id.ToString(); } if (thisTicket.issue_type_id != null) { issue_type_id.SelectedValue = thisTicket.issue_type_id.ToString(); } if (thisTicket.source_type_id != null) { source_type_id.SelectedValue = thisTicket.source_type_id.ToString(); } if (thisTicket.issue_type_id != null) { issue_type_id.SelectedValue = thisTicket.issue_type_id.ToString(); } if (thisTicket.sla_id != null) { sla_id.SelectedValue = thisTicket.sla_id.ToString(); } if (thisTicket.department_id != null) { department_id.SelectedValue = thisTicket.department_id.ToString(); } } ticketUdfValueList = new UserDefinedFieldsBLL().GetUdfValue(DicEnum.UDF_CATE.TASK, thisTicket.id, tickUdfList); thisAccount = new CompanyBLL().GetCompany(thisTicket.account_id); if (thisTicket.contact_id != null) { thisContact = new crm_contact_dal().FindNoDeleteById((long)thisTicket.contact_id); } if (thisTicket.owner_resource_id != null && thisTicket.role_id != null) { var resDepList = new sys_resource_department_dal().GetResDepByResAndRole((long)thisTicket.owner_resource_id, (long)thisTicket.role_id); if (resDepList != null && resDepList.Count > 0) { proResDep = resDepList[0]; priRes = new sys_resource_dal().FindNoDeleteById((long)thisTicket.owner_resource_id); } } if (thisTicket.installed_product_id != null) { insPro = new crm_installed_product_dal().FindNoDeleteById((long)thisTicket.installed_product_id); } if (thisTicket.contract_id != null) { thisContract = new ctt_contract_dal().FindNoDeleteById((long)thisTicket.contract_id); } if (thisTicket.cost_code_id != null) { thisCostCode = new d_cost_code_dal().FindNoDeleteById((long)thisTicket.cost_code_id); } var otherResList = new sdk_task_resource_dal().GetTaskResByTaskId(thisTicket.id); if (otherResList != null && otherResList.Count > 0) { foreach (var item in otherResList) { if (item.resource_id != null && item.role_id != null) { var resDepList = new sys_resource_department_dal().GetResDepByResAndRole((long)item.resource_id, (long)item.role_id); if (resDepList != null && resDepList.Count > 0) { ticketResIds += resDepList[0].id + ","; } } } if (ticketResIds != "") { ticketResIds = ticketResIds.Substring(0, ticketResIds.Length - 1); } } ticketCheckList = new sdk_task_checklist_dal().GetCheckByTask(thisTicket.id); if (ticketCheckList != null && ticketCheckList.Count > 0) { ticketCheckList = ticketCheckList.OrderBy(_ => _.sort_order).ToList(); } #region 时间轴显示相关 工单备注类型获取 var slaValue = new sdk_task_dal().GetSlaTime(thisTicket); string slaTimeValue = ""; if (slaValue != null) { slaTimeValue = slaValue.ToString(); } if (!string.IsNullOrEmpty(slaTimeValue)) { if (slaTimeValue.Substring(0, 1) == "{") { slaDic = new EMT.Tools.Serialize().JsonToDictionary(slaTimeValue); } } var actList = new d_general_dal().GetGeneralByTableId((int)GeneralTableEnum.ACTION_TYPE); if (actList != null && actList.Count > 0) { ticketNoteTypeList = actList.Where(_ => _.ext2 == ((int)DicEnum.ACTIVITY_CATE.TASK_NOTE).ToString()).ToList(); } #endregion entryList = new sdk_work_entry_dal().GetList(thisTicket.id); } } var ticket_type_id = Request.QueryString["ticket_type_id"]; if (!string.IsNullOrEmpty(ticket_type_id)) { this.ticket_type_id.ClearSelection(); this.ticket_type_id.SelectedValue = ticket_type_id; } } catch (Exception msg) { Response.Write("<script>alert('" + msg.Message + "');window.close();</script>"); } }
public void GetUdfByCate(HttpContext context) { var insProId = context.Request.QueryString["insProId"]; crm_installed_product insPro = null; List <DTO.UserDefinedFieldValue> iProduct_udfValueList = null; if (!string.IsNullOrEmpty(insProId)) { insPro = new DAL.crm_installed_product_dal().FindNoDeleteById(long.Parse(insProId)); var iProduct_udfList = new UserDefinedFieldsBLL().GetUdf(DTO.DicEnum.UDF_CATE.CONFIGURATION_ITEMS); iProduct_udfValueList = new UserDefinedFieldsBLL().GetUdfValue(DTO.DicEnum.UDF_CATE.CONFIGURATION_ITEMS, insPro.id, iProduct_udfList); } var cateId = context.Request.QueryString["cateId"]; string udfHtml = ""; if (!string.IsNullOrEmpty(cateId)) { var usdList = new DAL.sys_udf_field_dal().GetUdfByGroupId(long.Parse(cateId)); if (usdList != null && usdList.Count > 0) { var udfFileDto = new UserDefinedFieldsBLL().GetUdf((DTO.DicEnum.UDF_CATE.CONFIGURATION_ITEMS)); usdList.ForEach(_ => { DTO.UserDefinedFieldValue thisValue = null; if (iProduct_udfValueList != null && iProduct_udfValueList.Count > 0) { thisValue = iProduct_udfValueList.FirstOrDefault(ip => ip.id == _.id); } switch (_.data_type_id) { case (int)DTO.DicEnum.UDF_DATA_TYPE.SINGLE_TEXT: udfHtml += $"<tr><td class='ip_general_label_udf'><div class='clear'><label>{_.col_comment}</label><input type = 'text' name='{_.id}' class='sl_cdt' value='{(thisValue==null?"":thisValue.value)}' /></div></td></tr>"; break; case (int)DTO.DicEnum.UDF_DATA_TYPE.MUILTI_TEXT: udfHtml += $"<tr><td class='ip_general_label_udf'><div class='clear'><label>{_.col_comment}</label><textarea name='{_.id}' rows='2' cols='20'>{(thisValue == null ? "" : thisValue.value)}</textarea></div></td></tr>"; break; case (int)DTO.DicEnum.UDF_DATA_TYPE.DATETIME: udfHtml += $"<tr><td class='ip_general_label_udf'><div class='clear'><label>{_.col_comment}</label><input type = 'text' name='{_.id}' onclick='WdatePicker()' class='sl_cdt' value='{(thisValue == null ? "" : thisValue.value)}' /></div></td></tr>"; break; case (int)DTO.DicEnum.UDF_DATA_TYPE.NUMBER: udfHtml += $"<tr><td class='ip_general_label_udf'><div class='clear'><label>{_.col_comment}</label><input type = 'text' name='{_.id}' maxlength='11' onkeyup=\"value = value.replace(/[^\\d] / g, '') \" onbeforepaste=\"clipboardData.setData('text', clipboardData.getData('text').replace(/[^\\d] / g, ''))\" class='sl_cdt' value='{(thisValue == null ? "" : thisValue.value)}' /></div></td></tr>"; break; case (int)DTO.DicEnum.UDF_DATA_TYPE.LIST: var thisListHtml = ""; if (udfFileDto != null && udfFileDto.Count > 0) { var thisList = udfFileDto.FirstOrDefault(u => u.id == _.id); if (thisList != null && thisList.value_list != null && thisList.value_list.Count > 0) { if (_.is_required == 0) { thisListHtml += "<option value=''> </option>"; } thisList.value_list.ForEach(t => { if (thisValue != null && thisValue.value.ToString() == t.val) { thisListHtml += $"<option value='{t.val}' selected='selected'>{t.show}</option>"; } else { thisListHtml += $"<option value='{t.val}'>{t.show}</option>"; } }); } } udfHtml += $"<tr><td class='ip_general_label_udf'><div class='clear'><label>{_.col_comment}</label><select class='sl_cdt' name='{_.id}'>{thisListHtml}</select></div></td></tr>"; break; default: break; } }); } } context.Response.Write(udfHtml); }
protected void Page_Load(object sender, EventArgs e) { try { thisBookMark = new IndexBLL().GetSingBook(Request.RawUrl, LoginUserId); iProduct_udfList = new UserDefinedFieldsBLL().GetUdf(DicEnum.UDF_CATE.CONFIGURATION_ITEMS); var contract_id = Request.QueryString["contract_id"]; if (!string.IsNullOrEmpty(contract_id)) { contract = new ctt_contract_dal().FindNoDeleteById(long.Parse(contract_id)); if (contract != null) { account = new CompanyBLL().GetCompany(contract.account_id); } } var contactId = Request.QueryString["contact_id"]; if (!string.IsNullOrEmpty(contactId)) { contact = new ContactBLL().GetContact(long.Parse(contactId)); if (contact != null) { account = new CompanyBLL().GetCompany(contact.account_id); } } var id = Request.QueryString["id"]; if (!string.IsNullOrEmpty(id)) { iProduct = new crm_installed_product_dal().GetInstalledProduct(long.Parse(id)); if (iProduct != null) { account = new CompanyBLL().GetCompany((long)iProduct.account_id); product = new ivt_product_dal().FindNoDeleteById(iProduct.product_id); } } var account_id = Request.QueryString["account_id"]; if (!string.IsNullOrEmpty(account_id)) { account = new CompanyBLL().GetCompany(long.Parse(account_id)); } //var contactList = new crm_contact_dal().GetContactByAccountId(account.id); //var serviceList = new ivt_service_dal().GetServiceList($" and vendor_id = {account.id}"); #region 配置下拉框数据源 var udfGroup = new d_general_dal().GetGeneralByTableId((int)GeneralTableEnum.UDF_FILED_GROUP); List <d_general> cateList = null; if (udfGroup != null && udfGroup.Count > 0) { cateList = udfGroup.Where(_ => _.parent_id == (int)UDF_CATE.CONFIGURATION_ITEMS).ToList(); } installed_product_cate_id.DataTextField = "name"; installed_product_cate_id.DataValueField = "id"; installed_product_cate_id.DataSource = cateList; installed_product_cate_id.DataBind(); installed_product_cate_id.Items.Insert(0, new ListItem() { Value = "", Text = " ", Selected = true }); //contact_id.DataTextField = "name"; //contact_id.DataValueField = "id"; //contact_id.DataSource = contactList; //contact_id.DataBind(); //contact_id.Items.Insert(0, new ListItem() { Value = "", Text = " ", Selected = true }); // //service.DataTextField = "name"; //service.DataValueField = "id"; //service.DataSource = serviceList; //service.DataBind(); //service.Items.Insert(0, new ListItem() { Value = "0", Text = " ", Selected = true }); //service.Enabled = false; // 所选合同如果是服务类型的,则此下拉框可选。可选内容为合同项 #endregion if (iProduct != null) { //account_id = iProduct.account_id.ToString(); iProduct_udfValueList = new UserDefinedFieldsBLL().GetUdfValue(DicEnum.UDF_CATE.CONFIGURATION_ITEMS, iProduct.id, iProduct_udfList); var isCopy = Request.QueryString["isCopy"]; product = new EMT.DoneNOW.BLL.ProductBLL().GetProduct(iProduct.product_id); isAdd = false; if (!string.IsNullOrEmpty(isCopy) && isCopy == "1") { isAdd = true; } if (!isAdd) { #region 记录浏览历史 var history = new sys_windows_history() { title = "配置项:" + (product == null ? "" : product.name) + account.name, url = Request.RawUrl, }; new IndexBLL().BrowseHistory(history, LoginUserId); #endregion } if (iProduct.contract_id != null) { contract = new ctt_contract_dal().FindNoDeleteById((long)iProduct.contract_id); } if (iProduct.cate_id != null) { installed_product_cate_id.SelectedValue = iProduct.cate_id.ToString(); } if (iProduct.contact_id != null) { contact_id.SelectedValue = iProduct.contact_id.ToString(); } viewSubscription_iframe.Src = "../Common/SearchBodyFrame.aspx?cat=" + (int)EMT.DoneNOW.DTO.DicEnum.QUERY_CATE.CONFIGSUBSCRIPTION + "&type=" + (int)EMT.DoneNOW.DTO.QueryType.CONFIGSUBSCRIPTION + "&id=" + iProduct.id; view_ticket_iframe.Src = "../Common/SearchBodyFrame.aspx?cat=" + (int)EMT.DoneNOW.DTO.DicEnum.QUERY_CATE.MY_QUEUE_ACTIVE + "&type=" + (int)EMT.DoneNOW.DTO.QueryType.MY_QUEUE_ACTIVE + "&group=215&con3962=" + iProduct.id + "¶m1=ShowPara"; // todo 订阅的通用查询 // "../Common/SearchBodyFrame.aspx?cat=" + (int)EMT.DoneNOW.DTO.DicEnum.QUERY_CATE.CONTACT_COMPANY_VIEW + "&type=" + (int)EMT.DoneNOW.DTO.QueryType.ContactCompanyView + "&id=" + id; thisNoteAtt = new com_attachment_dal().GetAttListByOid(iProduct.id); if (!isAdd) { if (iProduct.parent_id != null) { parentInsPro = new crm_installed_product_dal().GetInstalledProduct((long)iProduct.parent_id); } childInsProList = new crm_installed_product_dal().GetChildInsPro(iProduct.id); } } if (!IsPostBack) { is_active_.Checked = true; if (iProduct != null) { is_active_.Checked = iProduct.is_active == 1; } } } catch (Exception msg) { Response.Write("<script>alert('" + msg.Message + "');window.close();</script>"); } }
protected void Page_Load(object sender, EventArgs e) { thisBookMark = new IndexBLL().GetSingBook(Request.RawUrl, LoginUserId); if (!IsPostBack) { Bind(); // 绑定页面下拉数据 } if (noteTypeList != null && noteTypeList.Count > 0) { noteTypeList = noteTypeList.Where(_ => _.ext2 == ((int)DicEnum.TASK_TYPE.RECURRING_TICKET_MASTER).ToString()).ToList(); } if (publishList != null && publishList.Count > 0) { publishList = publishList.Where(_ => _.ext2 == ((int)DicEnum.ACTIVITY_CATE.TICKET_NOTE).ToString()).ToList(); } var ticketId = Request.QueryString["id"]; if (!string.IsNullOrEmpty(ticketId)) { thisTicket = new sdk_task_dal().FindNoDeleteById(long.Parse(ticketId)); } if (thisTicket != null) { isAdd = false; objectId = thisTicket.id; #region 获取工单基本信息 thisAccount = new CompanyBLL().GetCompany(thisTicket.account_id); if (thisTicket.contact_id != null) { thisContact = new crm_contact_dal().FindNoDeleteById((long)thisTicket.contact_id); } if (thisTicket.owner_resource_id != null && thisTicket.role_id != null) { priRes = new sys_resource_dal().FindNoDeleteById((long)thisTicket.owner_resource_id); thisRole = new sys_role_dal().FindNoDeleteById((long)thisTicket.role_id); var resDepList = new sys_resource_department_dal().GetResDepByResAndRole((long)thisTicket.owner_resource_id, (long)thisTicket.role_id); if (resDepList != null && resDepList.Count > 0) { proResDep = resDepList[0]; } } if (thisTicket.contract_id != null) { thisContract = new ctt_contract_dal().FindNoDeleteById((long)thisTicket.contract_id); } status_id.SelectedValue = thisTicket.status_id.ToString(); if (thisTicket.priority_type_id != null) { priority_type_id.SelectedValue = thisTicket.priority_type_id.ToString(); } if (thisTicket.issue_type_id != null) { issue_type_id.SelectedValue = thisTicket.issue_type_id.ToString(); } if (thisTicket.source_type_id != null) { source_type_id.SelectedValue = thisTicket.source_type_id.ToString(); } if (thisTicket.cate_id != null) { cate_id.SelectedValue = thisTicket.cate_id.ToString(); } if (thisTicket.cost_code_id != null) { cost_code_id.SelectedValue = thisTicket.cost_code_id.ToString(); } if (thisTicket.department_id != null) { department_id.SelectedValue = thisTicket.department_id.ToString(); } if (thisTicket.installed_product_id != null) { insPro = new crm_installed_product_dal().FindNoDeleteById((long)thisTicket.installed_product_id); } if (insPro != null) { thisProduct = new ivt_product_dal().FindNoDeleteById(insPro.product_id); } #endregion #region 获取工单周期信息 thisticketRes = new sdk_recurring_ticket_dal().GetByTicketId(thisTicket.id); #endregion ticketUdfValueList = new UserDefinedFieldsBLL().GetUdfValue(DicEnum.UDF_CATE.TASK, thisTicket.id, tickUdfList); #region 记录浏览历史 var history = new sys_windows_history() { title = $"编辑定期服务主工单:" + thisTicket.no + " " + thisTicket.title + " " + (thisAccount != null ? thisAccount.name : ""), url = Request.RawUrl, }; new IndexBLL().BrowseHistory(history, LoginUserId); #endregion } }
protected void Page_Load(object sender, EventArgs e) { try { var taskId = Request.QueryString["id"]; if (!string.IsNullOrEmpty(taskId)) { thisTicket = new sdk_task_dal().FindNoDeleteById(long.Parse(taskId)); if (thisTicket != null) { isAdd = false; thisBookMark = new IndexBLL().GetSingBook(Request.Url.LocalPath + "?id=" + taskId, LoginUserId); ticketUdfValueList = new UserDefinedFieldsBLL().GetUdfValue(DicEnum.UDF_CATE.TASK, thisTicket.id, tickUdfList); thisAccount = new CompanyBLL().GetCompany(thisTicket.account_id); if (thisTicket.contact_id != null) { thisContact = new crm_contact_dal().FindNoDeleteById((long)thisTicket.contact_id); } if (thisTicket.owner_resource_id != null && thisTicket.role_id != null) { var resDepList = new sys_resource_department_dal().GetResDepByResAndRole((long)thisTicket.owner_resource_id, (long)thisTicket.role_id); if (resDepList != null && resDepList.Count > 0) { proResDep = resDepList[0]; priRes = new sys_resource_dal().FindNoDeleteById((long)thisTicket.owner_resource_id); } } if (thisTicket.installed_product_id != null) { insPro = new crm_installed_product_dal().FindNoDeleteById((long)thisTicket.installed_product_id); } if (thisTicket.contract_id != null) { thisContract = new ctt_contract_dal().FindNoDeleteById((long)thisTicket.contract_id); } if (thisTicket.cost_code_id != null) { thisCostCode = new d_cost_code_dal().FindNoDeleteById((long)thisTicket.cost_code_id); } ticketCheckList = new sdk_task_checklist_dal().GetCheckByTask(thisTicket.id); if (ticketCheckList != null && ticketCheckList.Count > 0) { ticketCheckList = ticketCheckList.OrderBy(_ => _.sort_order).ToList(); } entryList = new sdk_work_entry_dal().GetList(thisTicket.id); var otherResList = new sdk_task_resource_dal().GetTaskResByTaskId(thisTicket.id); if (otherResList != null && otherResList.Count > 0) { ticketResList = new List <sys_resource_department>(); var srdDal = new sys_resource_department_dal(); foreach (var resRole in otherResList) { if (resRole.resource_id == null || resRole.role_id == null) { continue; } var thisResDep = srdDal.GetResDepByResAndRole((long)resRole.resource_id, (long)resRole.role_id); if (thisResDep != null && thisResDep.Count > 0) { ticketResList.Add(thisResDep[0]); } } } if (thisTicket.service_id != null) { thisService = new ivt_service_dal().FindNoDeleteById((long)thisTicket.service_id); if (thisService == null) { thisServiceBun = new ivt_service_bundle_dal().FindNoDeleteById((long)thisTicket.service_id); } } createRes = new sys_resource_dal().FindNoDeleteById(thisTicket.create_user_id); var slaValue = new sdk_task_dal().GetSlaTime(thisTicket); string slaTimeValue = ""; if (slaValue != null) { slaTimeValue = slaValue.ToString(); } if (!string.IsNullOrEmpty(slaTimeValue)) { if (slaTimeValue.Substring(0, 1) == "{") { slaDic = new EMT.Tools.Serialize().JsonToDictionary(slaTimeValue); } } var actList = new d_general_dal().GetGeneralByTableId((int)GeneralTableEnum.ACTION_TYPE); if (actList != null && actList.Count > 0) { ticketNoteTypeList = actList.Where(_ => _.ext2 == ((int)DicEnum.ACTIVITY_CATE.TASK_NOTE).ToString()).ToList(); } ticketOther = new sdk_task_other_dal().GetTicketOther(thisTicket.id); ticketOtherList = new sdk_task_other_person_dal().GetTicketOther(thisTicket.id); } } var ticketIds = Request.QueryString["ids"]; if (!string.IsNullOrEmpty(ticketIds)) { pageTicketList = new sdk_task_dal().GetTicketByIds(ticketIds); } if (thisTicket == null) { Response.Write("<script>alert('未查询到该工单信息!');window.close();</script>"); return; } var history = new sys_windows_history() { title = "工单:" + thisTicket.no + ":" + thisTicket.title, url = Request.RawUrl, }; new IndexBLL().BrowseHistory(history, LoginUserId); } catch (Exception msg) { Response.Write("<script>alert('" + msg.Message + "');window.close();</script>"); } }
protected void Page_Load(object sender, EventArgs e) { try { #region 拉框配数据源 period_type_id.DataTextField = "show"; period_type_id.DataValueField = "val"; period_type_id.DataSource = dic.FirstOrDefault(_ => _.Key == "period_type").Value; period_type_id.DataBind(); period_type_id.Items.Insert(0, new ListItem() { Value = "0", Text = " ", Selected = true }); #endregion var iProduct_id = Request.QueryString["insProId"]; if (!string.IsNullOrEmpty(iProduct_id)) { iProduct = new crm_installed_product_dal().GetInstalledProduct(long.Parse(iProduct_id)); } var id = Request.QueryString["id"]; if (!string.IsNullOrEmpty(id)) { subscription = new crm_subscription_dal().GetSubscription(long.Parse(id)); iProduct = new crm_installed_product_dal().GetInstalledProduct(subscription.installed_product_id); period_type_id.SelectedValue = subscription.period_type_id.ToString(); // period_type_id.Enabled = false; isAdd = false; subPeriodList = new crm_subscription_period_dal().GetSubPeriodByWhere($" and subscription_id = {subscription.id}"); } if (iProduct == null) { Response.End(); } if (!IsPostBack) { if (subscription != null) { if (subscription.status_id != 1) { status_id.SelectedValue = subscription.status_id.ToString(); } else { status_id.SelectedValue = "1"; } } else { status_id.SelectedValue = "1"; } } } catch (Exception) { Response.End(); } }