Пример #1
0
        private void SetInfo(Foresight.DataAccess.ViewCustomerService data)
        {
            this.ProjectID               = data.ProjectID;
            this.OrderNumberID           = data.OrderNumberID;
            this.tdProjectName.InnerHtml = data.FinalProjectName;
            this.tdFullName.Value        = data.ServiceFullName;
            this.tdAddCustomerName.Value = data.AddCustomerName;
            this.tdAddCallPhone.Value    = data.AddCallPhone;
            this.tdIsHighTouSu.Value     = data.IsHighTouSu ? "1" : "0";
            this.tdIsInvalidCall.Value   = data.IsInvalidCall ? "1" : "0";
            this.tdIsInWeiBao.Value      = data.IsInWeiBao ? "1" : "0";
            this.hdServiceFrom.Value     = data.ServiceFrom;
            this.tdServiceFrom.InnerHtml = Utility.EnumHelper.GetDescription <Utility.EnumModel.WechatServiceFromDefine>(data.ServiceFrom);
            this.tdServiceNumber.Value   = data.ServiceNumber;
            this.tdAppointTime.Value     = WebUtil.GetStrDate(data.ServiceAppointTime, format: "yyyy-MM-dd HH:mm:ss");
            this.tdTaskType.Value        = data.TaskType > 0 ? data.TaskType.ToString() : "";
            this.tdServiceArea.Value     = data.ServiceArea;
            this.tdServiceContent.Value  = data.ServiceContent;
            this.tdBelongTeamName.Value  = data.DepartmentID > 0 ? data.DepartmentID.ToString() : "";
            var ServiceAccpetManIDList = Foresight.DataAccess.CustomerService_Accpet.GetCustomerService_AccpetListByServiceID(data.ID, new int[] { 0, 1 }).Select(p => p.AccpetManID).ToArray();

            this.tdAcceptManInput.Value  = ServiceAccpetManIDList.Length > 0 ? ServiceAccpetManIDList[0].ToString() : "";
            this.tdAddUserName.InnerHtml = data.AddUserName;
            this.tdAddTime.InnerHtml     = WebUtil.GetStrDate(data.AddTime, format: "yyyy-MM-dd HH:mm:ss");
            this.tdServiceType1.Value    = data.ServiceType1ID > 0 ? data.ServiceType1ID.ToString() : "";
            if (data.ServiceType2IDList.Length > 0)
            {
                this.tdServiceType2.Value = string.Join(",", data.ServiceType2IDList);
            }
            if (data.ServiceType3IDList.Length > 0)
            {
                this.tdServiceType3.Value = string.Join(",", data.ServiceType3IDList);
            }
        }
Пример #2
0
        private void SetInfo(Foresight.DataAccess.ViewCustomerService service)
        {
            this.CompanyName.InnerHtml   = WebUtil.GetCompany(this.Context).CompanyName;
            this.tdServiceType.InnerHtml = service.ServiceTypeName;
            if (service.TaskType > 0)
            {
                var tasktype = Foresight.DataAccess.CustomerService_Task.GetCustomerService_Task(service.TaskType);
                this.tdTaskType.InnerHtml = tasktype != null ? tasktype.TaskName : "";
            }
            this.tdServiceNumber.InnerHtml = service.ServiceNumber;
            this.tdAddUserName.InnerHtml   = service.AddUserName;
            if (service.SendUserID > 0)
            {
                var user = Foresight.DataAccess.User.GetUser(service.SendUserID);
                this.tdAddUserName.InnerHtml           = user == null ? service.SendUserName : user.RealName;
                this.tdServiceAccpetManPhone.InnerHtml = user != null ? user.PhoneNumber : "";
            }
            this.tdAcceptMan.InnerHtml       = service.FinalServiceAccpetMan;
            this.tdAPPSendTime.InnerHtml     = service.APPSendTime == DateTime.MinValue ? "" : service.APPSendTime.ToString("yyyy-MM-dd HH:mm");
            this.tdAddCustomerName.InnerHtml = service.AddCustomerName;
            this.tdAppointTime.InnerHtml     = service.ServiceAppointTime == DateTime.MinValue ? "" : service.ServiceAppointTime.ToString("yyyy-MM-dd HH:mm");
            this.tdAddCallPhone.InnerHtml    = service.AddCallPhone;
            this.tdFullName.InnerHtml        = service.ServiceFullName;
            this.tdServiceContent.InnerHtml  = service.ServiceContent;
            this.tdAcceptTime.InnerHtml      = service.AcceptTime == DateTime.MinValue ? "" : service.AcceptTime.ToString("yyyy-MM-dd HH:mm");
            this.tdBanJieTime.InnerHtml      = service.BanJieTime == DateTime.MinValue ? "" : service.BanJieTime.ToString("yyyy-MM-dd HH:mm");
            this.tdBanJieNote.InnerHtml      = service.BanJieNote;

            this.tdChargeStatus.InnerHtml = "未收取费用";
            if (service.IsRequireCost && service.TotalFee > 0)
            {
                this.tdChargeStatus.InnerHtml = "已收取费用";
            }
            this.tdTotalFee.InnerHtml = service.TotalFee > 0 ? service.TotalFee.ToString() : "";
        }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.QueryString["op"]))
         {
             op = Request.QueryString["op"];
         }
         if (!string.IsNullOrEmpty(Request.QueryString["ServiceType"]))
         {
             int.TryParse(Request.QueryString["ServiceType"], out ServiceType);
         }
         guid = System.Guid.NewGuid().ToString();
         this.tdAddUserName.InnerHtml = WebUtil.GetUser(this.Context).FinalRealName;
         this.tdAddTime.InnerHtml     = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
         int.TryParse(Request.QueryString["ID"], out ID);
         Foresight.DataAccess.ViewCustomerService data = null;
         if (ID > 0)
         {
             data = Foresight.DataAccess.ViewCustomerService.GetViewCustomerServiceByID(ID);
         }
         if (data != null)
         {
             SetInfo(data);
         }
         else
         {
             string ServiceFrom = WebUtil.GetUser(this.Context).ServiceFrom;
             ServiceFrom = string.IsNullOrEmpty(ServiceFrom) ? Utility.EnumModel.WechatServiceFromDefine.system.ToString() : ServiceFrom;
             string ServiceFromDesc = Utility.EnumHelper.GetDescription <Utility.EnumModel.WechatServiceFromDefine>(ServiceFrom);
             this.tdServiceFrom.InnerHtml = ServiceFromDesc;
             this.hdServiceFrom.Value     = ServiceFrom;
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Foresight.DataAccess.ViewCustomerService data = null;
         int.TryParse(Request.QueryString["ID"], out ID);
         int.TryParse(Request.QueryString["status"], out status);
         if (ID > 0)
         {
             data = Foresight.DataAccess.ViewCustomerService.GetViewCustomerServiceByID(ID);
         }
         if (data != null)
         {
             SetInfo(data);
         }
     }
 }
        private void SetInfo(Foresight.DataAccess.ViewCustomerService data)
        {
            var accpetUserList         = Foresight.DataAccess.CustomerService_Accpet.GetCustomerService_AccpetListByServiceID(data.ID, new int[] { 0, 1 }, AccpetUserType: 0);
            var ServiceAccpetManIDList = accpetUserList.Where(p => p.AccpetUserType == 1).Select(p => p.AccpetManID).ToArray();

            this.tdAcceptManInput.Value = ServiceAccpetManIDList.Length > 0 ? ServiceAccpetManIDList[0].ToString() : "";
            var ServiceProcessManIDList = accpetUserList.Where(p => p.AccpetUserType == 2).Select(p => p.AccpetManID).ToArray();

            this.tdServiceProcessManID.Value = ServiceProcessManIDList.Length > 0 ? ServiceProcessManIDList[0].ToString() : "";
            this.ProjectID = data.ProjectID > 0 ? data.ProjectID : 0;
            if (this.ProjectID <= 0)
            {
                var topProjectList  = Foresight.DataAccess.Project.GetTopProjectListByCompanyID(0, WebUtil.GetUser(this.Context).UserID);
                var topProjectItems = topProjectList.Select(p =>
                {
                    var item = new { ID = p.ID, Name = p.Name };
                    return(item);
                }).ToArray();
                this.hdProjectName.Value = Utility.JsonConvert.SerializeObject(topProjectItems);
            }
        }