Esempio n. 1
0
    //如果填写了用户姓名和电话则创建一个工单
    private void CreateWorkBill(int intCCID, string strProductID, string strLoginName, string strCallInUserName, string strCallInTel, string strDiscription)
    {
        HYTD.BLL.Call_CustomerBLL ccbll   = new HYTD.BLL.Call_CustomerBLL();
        Models.Call_Customer      ccModel = new Models.Call_Customer();
        ccModel = ccbll.GetCall_CustomerEntity(intCCID);
        if (ccModel != null)
        {
            HYTD.BLL.Call_WorkBillBLL wbll   = new HYTD.BLL.Call_WorkBillBLL();
            Models.Call_WorkBill      wModel = new Models.Call_WorkBill();
            wModel.CWB_Status         = 28;
            wModel.CWB_Type           = 35;
            wModel.CWB_SoftType       = 0;
            wModel.CWB_ServiceType    = 10;
            wModel.CWB_CallType       = 0;
            wModel.CWB_CCID           = intCCID;
            wModel.CWB_CallInUserName = strCallInUserName;
            wModel.CWB_CallInTel      = strCallInTel;
            wModel.CWB_CallInEmail    = "";
            wModel.CWB_OperationTime  = DateTime.Now;
            int intOwner = 0;
            int.TryParse(ccModel.CC_Owner, out intOwner);
            wModel.CWB_ForUser         = intOwner;
            wModel.CWB_OperationUser   = intOwner;
            wModel.CWB_CreateTime      = wModel.CWB_OperationTime.Value;
            wModel.CWB_Creater         = 16;
            wModel.CWB_Description     = strDiscription;
            wModel.CWB_Remark          = "用户主动上传";
            wModel.CWB_CallInLoginName = strLoginName;
            wModel.CWB_ProductID       = strProductID;
            wModel.CWB_Code            = wbll.WorkBillCreateCode();

            try
            {
                wbll.AddCall_WorkBill(wModel);
            }
            catch (Exception ex)
            {
            }
        }
    }
Esempio n. 2
0
    private void DataBind()
    {
        Call_WorkBillTO sto = new Call_WorkBillTO();

        #region 条件
        if (!string.IsNullOrEmpty(Request["code"]))
        {
            sto.CWB_Code = Request["code"].ToString().Trim();//存 客户名称
        }
        if (!string.IsNullOrEmpty(Request["cname"]))
        {
            sto.CWB_Remark = Request["cname"].ToString().Trim();//存 客户名称
        }
        if (!string.IsNullOrEmpty(Request["uname"]))
        {
            sto.CWB_Solution = Request["uname"].ToString().Trim();//存 用户名称
        }
        else
        {
            sto.CWB_Solution = strLoginUserName;
        }
        if (!string.IsNullOrEmpty(Request["stime"]))
        {
            DateTime dtStime = Convert.ToDateTime("1980-01-01");
            DateTime.TryParse(Request["stime"].ToString().Trim(), out dtStime);
            sto.CWB_CreateTime = dtStime;//保存操作开始时间
        }
        if (!string.IsNullOrEmpty(Request["etime"]))
        {
            DateTime dtEtime = Convert.ToDateTime("2250-01-01");
            DateTime.TryParse(Request["etime"].ToString().Trim(), out dtEtime);
            sto.CWB_OperationTime = dtEtime;//保存操作结束时间
        }

        if (!string.IsNullOrEmpty(Request["Owner"])) //存 客户所属工程师
        {
            sto.CWB_Description = Request["Owner"].ToString().Trim();
        }
        if (!string.IsNullOrEmpty(Request["sltType"]))
        {
            sto.CWB_Type = Convert.ToInt16(Request["sltType"].ToString().Trim());
            intSelected  = sto.CWB_Type;
        }
        if (!string.IsNullOrEmpty(Request["status"]))
        {
            int intStatus = 0;
            int.TryParse(Request["status"].ToString().Trim(), out intStatus);

            sto.CWB_Status = intStatus;
            intSelected    = sto.CWB_Type;
        }
        #endregion
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            int.TryParse(Request.QueryString["pageIndex"], out pageIndex);
        }
        HYTD.BLL.Call_WorkBillBLL bll = new HYTD.BLL.Call_WorkBillBLL();
        DataTable dt = bll.GetCall_WorkBillList(sto, pageIndex, pageSize, "", out rowCount);
        //分页
        string getUrl = "";
        if (Request.Url.Query.Length > 0 && Request.Url.Query.IndexOf("pageIndex") > -1 && Request.Url.Query.IndexOf("&") > -1)
        {
            getUrl = Request.Url.Query.Substring(Request.Url.Query.IndexOf("&"));
        }
        else if (Request.Url.Query.Length > 0)
        {
            getUrl = Request.Url.Query.Substring(1);
        }
        string url = "WorkBillList.aspx?pageIndex={0}&" + getUrl.Trim('&');
        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);

        if (dt.Rows.Count > 0)
        {
            StringBuilder sbContent = new StringBuilder();
            string        strNew    = string.Empty;
            string        strEdit   = string.Empty;
            foreach (DataRow dr in dt.Rows)
            {
                strNew  = string.Format("<a href=\"javascript:;\" name=\"NewWorkBill\" onclick=\"NewWorkBill({0})\" >新建</a>   ", dr["CC_ID"]);
                strEdit = string.Format("<a href=\"javascript:;\" name=\"EditWorkBill\" onclick=\"EditWorkBill({0})\">修改</a>", dr["CWB_ID"].ToString());
                if (dr["CWB_Status"].ToString() != ((int)PublicEnum.CallWorkBillStatus.Visited).ToString())
                {
                    strEdit += string.Format("&nbsp;<a href=\"javascript:;\" name=\"EditWorkBill\" onclick=\"HuifangWorkBill({0})\">回访</a>", dr["CWB_ID"].ToString());
                }
                sbContent.AppendFormat("<tbody>");
                if (dr["CWB_Status"].ToString() == "服务中")
                {
                    sbContent.AppendFormat("<tr style=\"color:red;\">");
                }
                else
                {
                    sbContent.AppendFormat("<tr>");
                }
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\"><a href=\"javascript:;\"  onclick=\"ShowWorkBill({1})\">{0}</a></td>", dr["CWB_Code"].ToString(), dr["CWB_ID"].ToString());
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["C_Name"].ToString());
                sbContent.AppendFormat("<td class=\"by\" style=\"width:120px;\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Name"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CWB_CallInUserName"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CWB_CallInTel"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CreateUserName"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CWB_CreateTime"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["ServiceUserName"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CWB_OperationTime"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;({1})</td>", dr["CWB_Status"].ToString(), dr["MYDStatus"].ToString());
                //sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", "服务记录");
                sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", strNew + strEdit);
                sbContent.AppendFormat("</tr>");
                sbContent.AppendFormat("</tbody>");
            }

            script = sbContent.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        //if (rowCount % pageSize == 0)
        //{
        //    pageNum = rowCount / pageSize;
        //}
        //else
        //{
        //    pageNum = (rowCount / pageSize) + 1;
        //}
    }
Esempio n. 3
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();// strWhere = "1=1";

        sb.Append("1=1");
        string browser = Request.Browser.Browser;

        if (!string.IsNullOrEmpty(Request["code"]))
        {
            sb.AppendFormat(" and CWB_Code like '%{0}%'", Request["code"].ToString().Trim());//;;//存 客户名称
        }
        if (!string.IsNullOrEmpty(Request["cname"]))
        {
            sb.AppendFormat(" and b.CC_Name like '%{0}%'", Request["cname"].ToString().Trim());//存 客户名称
        }
        if (!string.IsNullOrEmpty(Request["uname"]))
        {
            sb.AppendFormat(" and d.UserName like '%{0}%'", Request["uname"].ToString().Trim());//存 用户名称
        }
        if (!string.IsNullOrEmpty(Request["stime"]))
        {
            DateTime dtStime = Convert.ToDateTime("1980-01-01");
            DateTime.TryParse(Request["stime"].ToString().Trim(), out dtStime);
            sb.AppendFormat(" and CWB_CreateTime > '{0}'", dtStime.AddDays(-1));//保存操作开始时间
        }
        if (!string.IsNullOrEmpty(Request["etime"]))
        {
            DateTime dtEtime = Convert.ToDateTime("2250-01-01");
            DateTime.TryParse(Request["etime"].ToString().Trim(), out dtEtime);
            sb.AppendFormat(" and CWB_CreateTime < '{0}'", dtEtime.AddDays(1)); //保存操作结束时间
        }
        if (!string.IsNullOrEmpty(Request["Owner"]))                            //存 客户所属工程师
        {
            sb.AppendFormat(" and CWB_Description = '{0}'", Request["Owner"].ToString().Trim());
        }
        if (!string.IsNullOrEmpty(Request["sltType"]) && Request["sltType"].ToString().Trim() != "0")
        {
            sb.AppendFormat(" and CWB_Type = '{0}'", Convert.ToInt16(Request["sltType"].ToString().Trim()));
        }
        if (!string.IsNullOrEmpty(Request["status"]))
        {
            int intStatus = 0;
            int.TryParse(Request["status"].ToString().Trim(), out intStatus);
            int intStatus1 = 27;
            int.TryParse(ConfigurationManager.AppSettings["workbillStatusAll"].ToString(), out intStatus1);
            if (intStatus1 == intStatus)
            {
            }
            else
            {
                sb.AppendFormat(" and CWB_Status = '{0}'", intStatus);
            }
        }

        DataTable dt = new DataTable();

        HYTD.BLL.Call_WorkBillBLL bll = new HYTD.BLL.Call_WorkBillBLL();
        dt = bll.ImportExcelCustomerWorkBill(sb.ToString()).Tables[0];
        NPOI.SS.UserModel.IWorkbook book1 = new ImportExcel().ImportCustomerWorkBill(dt, "客户服务记录");
        string strFile  = string.Empty;
        string filename = string.Empty;
        string strPath  = HttpContext.Current.Server.MapPath("/" + System.Configuration.ConfigurationManager.AppSettings["CustomerFiles"].ToString().Replace("\\", "/") + "/")
                          + "\\" + DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString().PadLeft(2, '0') + "\\";

        if (dt.Rows.Count > 0)
        {
            strFile  = dt.Rows[0]["客户名称"].ToString();
            filename = strPath + dt.Rows[0]["客户名称"].ToString() + ".xls";
            if (!System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(filename)))
            {
                System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(filename));
            }
            try
            {
                System.IO.FileStream file1 = new System.IO.FileStream(filename, System.IO.FileMode.Create);
                book1.Write(file1);

                file1.Dispose();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        Response.Clear();
        Response.BufferOutput    = false;
        Response.ContentEncoding = System.Text.Encoding.UTF8;
        if (browser.ToLower() != "firefox")
        {
            Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFile) + ".xls");
        }
        else
        {
            Response.AddHeader("Content-Disposition", "attachment;filename=" + strFile + ".xls");
        }
        Response.ContentType = "application/ms-excel";
        book1.Write(Response.OutputStream);
        book1.Dispose();
    }
Esempio n. 4
0
    private void BindData()
    {
        HYTD.BLL.Call_WorkBillBLL WBll  = new HYTD.BLL.Call_WorkBillBLL();
        HYTD.BLL.Call_CustomerBLL ccBll = new HYTD.BLL.Call_CustomerBLL();

        HYTD.BLL.Call_CustomerBLL CBll = new HYTD.BLL.Call_CustomerBLL();
        //Call_Customer ccModel = new Call_Customer();
        if (CID > 0)
        {
            cModel = ccBll.GetCall_CustomerEntity(CID);
        }
        if (cModel == null)
        {
            cModel = new Call_Customer();
        }
        if (WID > 0)
        {
            #region   //获取工单信息
            wModel = WBll.GetCall_WorkBillEntity(WID);
            if (wModel == null)
            {
                wModel = new Call_WorkBill();
            }

            CID         = wModel.CWB_CCID;
            intWorkBill = wModel.CWB_Type;
            if (wModel.CWB_ServiceType != null)
            {
                intServiceType = wModel.CWB_ServiceType.Value;
            }
            if (wModel.CWB_SoftType != null)
            {
                intSoftWare = wModel.CWB_SoftType.Value;
            }
            if (wModel.CWB_CallType != null)
            {
                intConsultType = wModel.CWB_CallType.Value;
            }
            intStatus = wModel.CWB_Status;
            UserInfoBLL userBll = new UserInfoBLL();
            strUserName   = userBll.GetUserInfoEntityByUserCode(wModel.CWB_Creater);
            strCreateTime = getDateToString(wModel.CWB_CreateTime);
            if (wModel.CWB_OperationTime != null)
            {
                strOptionTime = getDateToString(wModel.CWB_OperationTime.Value);
            }
            else
            {
                strOptionTime = getDateToString(DateTime.Now);
            }
            intCreater = wModel.CWB_Creater;
            if (wModel.CWB_ForUser != null && wModel.CWB_ForUser.Value > 0)
            {
                intForUser = wModel.CWB_ForUser.Value;
            }
            strBillCode = wModel.CWB_Code;
            #endregion

            #region 满意度调查
            HYTD.BLL.Call_SatisfactionBLL      csBll  = new HYTD.BLL.Call_SatisfactionBLL();
            HYTD.BLL.Call_Satisfaction_ItemBLL csiBll = new HYTD.BLL.Call_Satisfaction_ItemBLL();

            sModel = csBll.GetCall_SatisfactionEntityBYCWBID(wModel.CWB_ID);
            if (sModel != null)
            {
                siModel = csiBll.GetCall_Satisfaction_ItemEntityBYCSID(sModel.CS_ID);
                RadioButtonList1.SelectedValue = siModel.CSI_Result.Value.ToString();
            }
            else
            {
                sModel = new Call_Satisfaction();
            }
            #endregion
        }

        //获取客户信息
        cModel = CBll.GetCall_CustomerEntity(CID);
        if (cModel == null)
        {
            cModel = new Call_Customer();
        }
        if (CID > 0)
        {
            intCounts = WBll.GetCall_WorkBillCounts(CID);
        }
    }
Esempio n. 5
0
    public void toList(string strMessage, string strErrorCode, string UserName, string UserTel)
    {
        try
        {
            int intCustomerID = 0;//strList[0]
            //strUserName.Split(new[] { "cdc" }, StringSplitOptions.None);
            //string[] strList = System.Text.RegularExpressions.Regex.Split(strUserName, @"$#$", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
            string[]       strList      = strMessage.Split(new[] { "$$" }, StringSplitOptions.None);
            string         strLoginName = string.Empty;
            string         strProductID = "000000";
            SqlParameter[] parameters   =
            {
                new SqlParameter("@CustomerID",    SqlDbType.Int),
                new SqlParameter("@ProductID",     SqlDbType.VarChar,   50),
                new SqlParameter("@ErrorMessage",  SqlDbType.VarChar, 8000),
                new SqlParameter("@LoginName",     SqlDbType.VarChar,   50),
                new SqlParameter("@isSuccessfull", SqlDbType.Int),
                new SqlParameter("@ErrorCode",     SqlDbType.VarChar,   50),
                new SqlParameter("@IP",            SqlDbType.VarChar,   50),
                new SqlParameter("@UserName",      SqlDbType.VarChar,   50),
                new SqlParameter("@UserTel",       SqlDbType.VarChar, 50)
            };
            if (strList.Length > 3)
            {
                string strCustomerID = string.Empty;
                try
                {
                    strCustomerID = DESEncrypt.Decrypt_DES(strList[0]);
                }
                catch (Exception ex)
                { }
                int.TryParse(strCustomerID, out intCustomerID);
                if (intCustomerID < 1)
                {
                    try
                    {
                        strCustomerID = DESEncrypt.Decrypt_DES_Old(strList[0]);
                    }
                    catch (Exception ex)
                    { }

                    int.TryParse(strCustomerID, out intCustomerID);
                }
                int intSuccess = 0;
                int.TryParse(strList[3], out intSuccess);
                parameters[0].Value = intCustomerID;
                parameters[1].Value = strList[1];
                parameters[2].Value = strMessage.Replace("'", "”").Replace("-", "——");
                parameters[3].Value = strList[2];
                parameters[4].Value = intSuccess;
                parameters[5].Value = strErrorCode;
                parameters[6].Value = getIP(strList[4]);
                parameters[7].Value = UserName;
                parameters[8].Value = UserTel;
                strLoginName        = strList[2].Trim();
                strProductID        = strList[1].Trim();
            }
            else
            {
                parameters[0].Value = -1;
                parameters[1].Value = "0000";
                parameters[2].Value = "Error";
                parameters[3].Value = strMessage;
                parameters[4].Value = 0;
                parameters[5].Value = "无";
                parameters[7].Value = UserName;
                parameters[8].Value = UserTel;
            }
            DataSet ds = SqlHelperService.RunProcedure("UP_ActiveProductInfo_ADD", parameters, "ds");
            if (!string.IsNullOrEmpty(UserName) && !string.IsNullOrEmpty(UserTel))
            {
                HYTD.BLL.Call_WorkBillBLL   wbll       = new HYTD.BLL.Call_WorkBillBLL();
                List <Models.Call_WorkBill> wModelList = wbll.GetCall_WorkBillList(intCustomerID, strProductID, strLoginName);
                if (wModelList != null && wModelList.Count < 1)
                {
                    string strMessageNew = strMessage;
                    if (strMessage.IndexOf("验证成功") > -1)
                    {
                        strMessageNew = strMessage.Substring(strMessage.IndexOf("验证成功") + 4);
                    }
                    CreateWorkBill(intCustomerID, strProductID, strLoginName, UserName, UserTel, strMessageNew);
                }
            }
        }
        catch (Exception ex)
        {
            WebLog.WriteLog(string.Format("添加数据库报错:{0}", ex.Message + ex.HelpLink + ex.InnerException + ex.Source + ex.StackTrace + ex.TargetSite), "Error");
        }
    }
Esempio n. 6
0
    private void BindData()
    {
        HYTD.BLL.Call_WorkBillBLL WBll  = new HYTD.BLL.Call_WorkBillBLL();
        HYTD.BLL.Call_CustomerBLL ccBll = new HYTD.BLL.Call_CustomerBLL();

        HYTD.BLL.Call_CustomerBLL CBll = new HYTD.BLL.Call_CustomerBLL();
        //Call_Customer ccModel = new Call_Customer();
        if (CID > 0)
        {
            cModel = ccBll.GetCall_CustomerEntity(CID);
        }
        if (cModel == null)
        {
            cModel = new Call_Customer();
        }
        if (WID > 0)
        {
            //获取工单信息
            wModel = WBll.GetCall_WorkBillEntity(WID);
            if (wModel == null)
            {
                wModel = new Call_WorkBill();
            }

            CID = wModel.CWB_CCID;

            intWorkBill = wModel.CWB_Type;
            if (wModel.CWB_ServiceType != null)
            {
                intServiceType = wModel.CWB_ServiceType.Value;
            }
            if (wModel.CWB_SoftType != null)
            {
                intSoftWare = wModel.CWB_SoftType.Value;
            }
            if (wModel.CWB_CallType != null)
            {
                intConsultType = wModel.CWB_CallType.Value;
            }
            intStatus = wModel.CWB_Status;
            UserInfoBLL userBll = new UserInfoBLL();
            strUserName   = userBll.GetUserInfoEntityByUserCode(wModel.CWB_Creater);
            strCreateTime = getDateToString(wModel.CWB_CreateTime);
            if (wModel.CWB_OperationTime != null)
            {
                strOptionTime = getDateToString(wModel.CWB_OperationTime.Value);
            }
            else
            {
                strOptionTime = getDateToString(DateTime.Now);
            }
            intCreater = wModel.CWB_Creater;
            if (wModel.CWB_ForUser != null && wModel.CWB_ForUser.Value > 0)
            {
                intForUser = wModel.CWB_ForUser.Value;
            }
            strBillCode = wModel.CWB_Code;
        }
        else
        {
            wModel.CWB_CallInEmail    = cModel.CC_Email;
            wModel.CWB_CallInTel      = cModel.CC_Tel;
            wModel.CWB_CallInUserName = cModel.CC_UserName;

            strUserName   = CurrentUserInfo.UserName;
            strOptionTime = getDateToString(DateTime.Now);
            strCreateTime = strOptionTime;
            intCreater    = Convert.ToInt32(CurrentUserInfo.UserCode);
            if (cModel != null)
            {
                intForUser = Convert.ToInt32(cModel.CC_Owner);
            }
        }
        //获取客户信息
        cModel = CBll.GetCall_CustomerEntity(CID);
        if (cModel == null)
        {
            cModel = new Call_Customer();
        }
        if (CID > 0)
        {
            intCounts = WBll.GetCall_WorkBillCounts(CID);
        }
    }
Esempio n. 7
0
    private void BindData()
    {
        HYTD.BLL.Call_VisitBillBLL VBll = new HYTD.BLL.Call_VisitBillBLL();
        HYTD.BLL.Call_CustomerBLL  CBll = new HYTD.BLL.Call_CustomerBLL();

        HYTD.BLL.Call_WorkBillBLL WBll    = new HYTD.BLL.Call_WorkBillBLL();
        Call_WorkBill             wbModel = new Call_WorkBill();

        if (VID > 0)
        {
            //获取工单信息
            vModel = VBll.GetCall_VisitBillEntity(VID);
            WID    = vModel.CVB_CWB_ID;
        }
        else if (WID > 0)
        {
            wbModel = WBll.GetCall_WorkBillEntity(WID);
            vModel.CVB_CallInEmail    = wbModel.CWB_CallInEmail;
            vModel.CVB_CallInTel      = wbModel.CWB_CallInTel;
            vModel.CVB_CallInUserName = wbModel.CWB_CallInUserName;
            vModel.CVB_CallType       = wbModel.CWB_CallType;
            vModel.CVB_CCID           = wbModel.CWB_CCID;
            vModel.CVB_Creater        = wbModel.CWB_Creater;
            vModel.CVB_CreateTime     = wbModel.CWB_CreateTime;
            vModel.CVB_Description    = wbModel.CWB_Description;
            vModel.CVB_ForUser        = wbModel.CWB_ForUser;
            vModel.CVB_OperationTime  = wbModel.CWB_OperationTime;
            vModel.CVB_OperationUser  = wbModel.CWB_OperationUser;
            vModel.CVB_Remark         = wbModel.CWB_Remark;
            vModel.CVB_ServiceType    = wbModel.CWB_ServiceType;
            vModel.CVB_SoftType       = wbModel.CWB_SoftType;
            vModel.CVB_Solution       = wbModel.CWB_Solution;
            vModel.CVB_Status         = wbModel.CWB_Status;
            vModel.CVB_Type           = wbModel.CWB_Type;
        }

        if (vModel == null)
        {
            vModel = new Call_VisitBill();
        }
        CID         = vModel.CVB_CCID;
        intWorkBill = vModel.CVB_Type;
        if (vModel.CVB_ServiceType != null)
        {
            intServiceType = vModel.CVB_ServiceType.Value;
        }
        if (vModel.CVB_SoftType != null)
        {
            intSoftWare = vModel.CVB_SoftType.Value;
        }
        if (vModel.CVB_CallType != null)
        {
            intConsultType = vModel.CVB_CallType.Value;
        }
        if (vModel.CVB_Status != null)
        {
            intStatus = vModel.CVB_Status.Value;
        }

        UserInfoBLL userBll = new UserInfoBLL();

        strUserName   = userBll.GetUserInfoEntityByUserCode(vModel.CVB_Creater);
        strCreateTime = getDateToString(vModel.CVB_CreateTime);
        if (vModel.CVB_OperationTime != null)
        {
            strOptionTime = getDateToString(vModel.CVB_OperationTime.Value);
        }
        else
        {
            strOptionTime = getDateToString(DateTime.Now);
        }
        intCreater = vModel.CVB_Creater;
        if (vModel.CVB_ForUser != null && vModel.CVB_ForUser.Value > 0)
        {
            intForUser = vModel.CVB_ForUser.Value;
        }
        if (vModel.CVB_VisitTime != null)
        {
            strVisitTime = getDateToString(vModel.CVB_VisitTime.Value);
        }
        else
        {
            strVisitTime = getDateToString(DateTime.Now);
        }
        //else
        //{
        //    strUserName = CurrentUserInfo.UserName;
        //    strOptionTime = getDateToString(DateTime.Now);
        //    strCreateTime = strOptionTime;
        //    intCreater = Convert.ToInt32(CurrentUserInfo.UserCode);
        //    intForUser = intCreater;
        //}
        //获取客户信息
        cModel = CBll.GetCall_CustomerEntity(CID);
        if (cModel == null)
        {
            cModel = new Call_Customer();
        }
        strUserName = CurrentUserInfo.UserName;
    }
Esempio n. 8
0
    private void DataBind()
    {
        Call_WorkBillTO sto = new Call_WorkBillTO();

        #region 条件

        StringBuilder sb = new StringBuilder();
        sb.AppendFormat(" CWB_Status in(29,30) ");

        if (!string.IsNullOrEmpty(Request["code"]))
        {
            sb.AppendFormat(" and CWB_Code like '%{0}%' ", StringHelper.SQLFilter(Request["code"].ToString().Trim()));
        }
        if (!string.IsNullOrEmpty(Request["cname"]))
        {
            sb.AppendFormat(" and CC_Name like '%{0}%' ", StringHelper.SQLFilter(Request["cname"].ToString().Trim()));
        }
        if (!string.IsNullOrEmpty(Request["uname"]))
        {
            sb.AppendFormat(" and d.UserName like '%{0}%' ", StringHelper.SQLFilter(Request["uname"].ToString().Trim()));
        }
        else
        {
            sto.CWB_Solution = strLoginUserName;
        }
        sb.AppendFormat(" and CWB_OperationTime < '{0}' ", DateTime.Now.ToString("yyyy-MM-dd"));
        if (!string.IsNullOrEmpty(Request["stime"]))
        {
            DateTime dtStime = Convert.ToDateTime("1980-01-01");
            DateTime.TryParse(Request["stime"].ToString().Trim(), out dtStime);
            sb.AppendFormat(" and CWB_CreateTime >= '{0}' ", dtStime.ToString("yyyy-MM-dd"));
        }

        if (!string.IsNullOrEmpty(Request["etime"]))
        {
            DateTime dtEtime = Convert.ToDateTime("2250-01-01");
            DateTime.TryParse(Request["etime"].ToString().Trim(), out dtEtime);
            sb.AppendFormat(" and CWB_CreateTime < '{0}' ", dtEtime.AddDays(1).ToString("yyyy-MM-dd"));
        }

        if (!string.IsNullOrEmpty(Request["status"]))
        {
            int intstatus = 0;
            int.TryParse(Request["status"].ToString().Trim(), out intstatus);
            if (intstatus > 0)
            {
                sb.AppendFormat(" and CWB_MYDStatus = {0} ", intstatus);
            }
        }

        #endregion
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            int.TryParse(Request.QueryString["pageIndex"], out pageIndex);
        }
        HYTD.BLL.Call_WorkBillBLL bll = new HYTD.BLL.Call_WorkBillBLL();
        DataTable dt = bll.GetCall_WorkBillList(sb.ToString(), pageIndex, pageSize, "", out rowCount);
        //分页
        string getUrl = "";
        if (Request.Url.Query.Length > 0 && Request.Url.Query.IndexOf("pageIndex") > -1 && Request.Url.Query.IndexOf("&") > -1)
        {
            getUrl = Request.Url.Query.Substring(Request.Url.Query.IndexOf("&"));
        }
        else if (Request.Url.Query.Length > 0)
        {
            getUrl = Request.Url.Query.Substring(1);
        }
        string url = "SatisfactionList.aspx?pageIndex={0}&" + getUrl.Trim('&');
        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);

        if (dt.Rows.Count > 0)
        {
            StringBuilder sbContent = new StringBuilder();
            string        strNew    = string.Empty;
            string        strEdit   = string.Empty;
            foreach (DataRow dr in dt.Rows)
            {
                strNew = string.Format("<a href=\"javascript:;\" name=\"NewWorkBill\" onclick=\"NewWorkBill({0})\" >新建</a>   ", dr["CC_ID"]);
                if (dr["CWB_Status"].ToString() != ((int)PublicEnum.CallWorkBillStatus.Visited).ToString())
                {
                    strEdit = string.Format("&nbsp;<a href=\"javascript:;\" name=\"EditWorkBill\" onclick=\"HuifangWorkBill({0})\">满意度</a>", dr["CWB_ID"].ToString());
                }
                sbContent.AppendFormat("<tbody>");
                if (dr["MYDStatus"].ToString() == "待调查")
                {
                    sbContent.AppendFormat("<tr style=\"color:red;\">");
                }
                else
                {
                    sbContent.AppendFormat("<tr>");
                }
                //sbContent.AppendFormat("<tr>");
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\"><a href=\"javascript:;\"  onclick=\"ShowWorkBill({1})\">{0}</a></td>", dr["CWB_Code"].ToString(), dr["CWB_ID"].ToString());
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["C_Name"].ToString());
                sbContent.AppendFormat("<td class=\"by\" style=\"width:120px;\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Name"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CWB_CallInUserName"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CWB_CallInTel"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CreateUserName"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CWB_CreateTime"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["ServiceUserName"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CWB_OperationTime"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["MYDStatus"].ToString());
                //sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", "服务记录");
                sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", strNew + strEdit);
                sbContent.AppendFormat("</tr>");
                sbContent.AppendFormat("</tbody>");
            }

            script = sbContent.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        //if (rowCount % pageSize == 0)
        //{
        //    pageNum = rowCount / pageSize;
        //}
        //else
        //{
        //    pageNum = (rowCount / pageSize) + 1;
        //}
    }
Esempio n. 9
0
    private void SendMailInfoSetTestQF(bool bolIsTest, string mailTo, string mailCC, string mailBCC, string strDate)
    {
        string strTitle     = string.Empty;
        string strBody      = string.Empty;
        string strFilesPath = string.Empty;

        //string mailCCTO = mailCC;
        HYTD.BLL.Call_CustomerBLL   bll           = new HYTD.BLL.Call_CustomerBLL();
        Models.Call_Customer        mCustomer     = new Models.Call_Customer();
        List <Models.Call_Customer> mCustomerList = new List <Models.Call_Customer>();

        mCustomerList = bll.GetCall_CustomerList().Where(c => c.CC_IsSend == 1).ToList();
        //int i = 0;
        foreach (var v in mCustomerList)
        {
            strBody = string.Empty;
            //i++;
            //if (i > 2)
            //    break;
            if (v.CC_Status > 0 && v.CC_Email != null && v.CC_Email.Trim().Length > 0)
            {
                mailTo = v.CC_Email;
                //获取附件 如果没有附件则不添加
                HYTD.BLL.Call_WorkBillBLL bllworkbill = new HYTD.BLL.Call_WorkBillBLL();
                {
                    strFilesPath = "";
                    strTitle     = string.Format("关于近期收到我公司客服邮件的说明");
                }
                string str     = @"尊敬的客户:

 <p style='text-indent:2em; '>为了更好的服务客户,完善服务流程,提高服务效率和满意度,近期对我公司客服系统进行了升级,升级期间造成邮件误发的情况,在此深表歉意。客服系统升级后,客服人员记录工单的效率将大大提高,客服热线占线的情况将得到一定程度缓解。</p>


 <p style='text-indent:2em; '>非常感谢您一直以来对环宇通达的支持与厚爱, 值此中秋佳节来临之际,环宇通达公司全体员工,向您致以最诚挚的问候! 祝您节日愉快,阖家欢乐,幸福安康! </p>
";
                string strqian = @"<br /><br /><br />    <p class='x_MsoNormal'>
        <span style='font-family: &quot; 微软雅黑&quot; ,&quot; sans-serif&quot;'>多谢支持</span><span
            lang='EN-US'></span></p>
    <p class='x_MsoNormal'>
        <span lang='EN-US'>&nbsp;</span></p>
    <p class='x_MsoNormal'>
        <b><span lang='EN-US' style='font-size: 10.0pt; font-family: 微软雅黑,sans-serif&quot;
            color: #1F497D'>Best regards</span></b></p>
    <table class='x_MsoNormalTable' border='0' cellspacing='0' cellpadding='0' style='border-collapse: collapse'>
        <tbody>
            <tr>
                <td width='93' valign='top' style='width: 69.9pt; border: none; border-right: dotted windowtext 1.0pt;
                    padding: 0cm 5.4pt 0cm 5.4pt'>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 12.0pt; line-height: 115%; font-family: 宋体;
                            color: #1F497D'>
                            <img id='x_图片_x0020_1' src='http://www.hyitech.com/logo.jpg' alt='说明: hytd' height='92'
                                width='89' border='0'></span></p>
                </td>
                <td width='497' valign='top' style='width: 372.9pt; padding: 0cm 5.4pt 0cm 5.4pt'>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span style='font-size: 10.0pt; line-height: 115%; font-family: 华文行楷; color: #1F497D'>
                            售后支持服务</span><span lang='EN-US' style='font-size: 10.0pt; line-height: 115%; color: #1F497D'><br>
                            </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>
                                | Fax:400-0798-616 | </span>
                    </p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>E-mail:
                        </span><u><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #0563C1'>
                            <a href='#'>[email protected]</a></span></u><span lang='EN-US' style='font-size: 8.5pt;
                                line-height: 115%; color: #1F497D'></span></p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>Web:
                        </span><span lang='EN-US'><a href='#' target='_blank'><span style='font-size: 8.5pt;
                            line-height: 115%'>http://www.hyitech.com</span></a></span><span lang='EN-US' style='font-size: 8.5pt;
                                line-height: 115%; color: #1F497D'>
                                <br>
                            </span><span style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>
                                北京环宇通达科技有限公司</span><span lang='DE' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'></span></p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'><span
                            style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>微软金牌合作伙伴
                        </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>
                            | </span><span style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>
                                教育行业解决方案专家 </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%;
                                    color: #1F497D'></span>
                    </p>
                </td>
            </tr>
        </tbody>
    </table>";
                strBody = str + strqian;
                //if (ds.Tables[0].Rows.Count > 0)
                //{
                if (bolIsTest)
                {
                    strTitle = "" + strTitle;
                }
                sendMail(mailTo, v.CC_EmailUserName, mailCC, mailBCC, strTitle, strBody, strFilesPath);
                //}
            }
        }
    }
Esempio n. 10
0
    private void SendMailInfoSetTest(bool bolIsTest, string mailTo, string mailCC, string mailBCC, string strDate)
    {
        string strTitle     = string.Empty;
        string strBody      = string.Empty;
        string strFilesPath = string.Empty;
        string mailCCTO     = mailCC;

        HYTD.BLL.Call_CustomerBLL   bll           = new HYTD.BLL.Call_CustomerBLL();
        Models.Call_Customer        mCustomer     = new Models.Call_Customer();
        List <Models.Call_Customer> mCustomerList = new List <Models.Call_Customer>();

        mCustomerList = bll.GetCall_CustomerList().Where(c => c.CC_IsSend == 1).ToList();
        int i = 0;

        foreach (var v in mCustomerList)
        {
            i++;
            if (i > 2)
            {
                break;
            }
            if (v.CC_Status > 0 && v.CC_Email != null && v.CC_Email.Trim().Length > 0)
            {
                if (!bolIsTest)
                {
                    mailTo = mailCC = "";
                    mailTo = v.CC_Email;
                    if (mailCCTO.Length > 0)
                    {
                        mailCC = v.CC_CCEmail + "," + mailCCTO;
                    }
                    //密送给所属工程师
                    if (v.CC_Owner == "29")
                    {
                        mailBCC += ",[email protected]";
                    }
                    else if (v.CC_Owner == "37")
                    {
                        mailBCC += ",[email protected]";
                    }
                    else if (v.CC_Owner == "54")
                    {
                        mailBCC += ",[email protected]";
                    }
                    else
                    {
                        mailBCC += ",[email protected]";
                    }
                }
                else
                {
                    if (v.CC_Owner == "29")
                    {
                        mailTo = "*****@*****.**";
                    }
                    else if (v.CC_Owner == "37")
                    {
                        mailTo = "*****@*****.**";
                    }
                    else if (v.CC_Owner == "54")
                    {
                        mailTo = "*****@*****.**";
                    }
                    else
                    {
                        mailTo = "*****@*****.**";
                    }
                }
                //获取附件 如果没有附件则不添加
                DataSet ds = new DataSet();
                HYTD.BLL.Call_WorkBillBLL bllworkbill = new HYTD.BLL.Call_WorkBillBLL();
                //string strWhere = string.Format("CWB_CCID={0} and (convert(varchar(7),CWB_CreateTime,120)='{1}' or convert(varchar(7),CWB_CreateTime,120)='2015-04')", v.CC_ID, strDate.Substring(0, 4));
                string strWhere = string.Format("CWB_CCID={0} and convert(varchar(7),CWB_CreateTime,120)='{1}'", v.CC_ID, strDate.Substring(0, 7));
                ds = bllworkbill.ImportExcelCustomerWorkBill(strWhere);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    strFilesPath = getFile(ds.Tables[0]);
                    string strTypeInfo = string.Empty;
                    strTypeInfo = getTypeInfo(ds.Tables[1]);
                    strTitle    = string.Format("{0}微软正版化平台{1}份服务报告", v.CC_Name, Convert.ToDateTime(strDate).ToString("yyyy年MM"));
                    #region
                    //                    strBody = string.Format(@"{0},您好:<br /><br />
                    //    <p style='text-indent:2em; '>环宇通达公司微软正版化售后服务部,首先感谢您一直以来对我们的支持和鼓励。回望2014年,环宇通达是不断创新的一年。对于正版化平台:我们综合了历年来所有的服务项目与众多用户提出的宝贵意见,积极改善了正版化平台的诸多功能。对于售后服务:我们提供每月服务报告邮件通知、服务专线专人接听并解决用户问题、定期巡检及时排除客户平台故障、其它邮件和远程协助服务。</p>
                    //    <p style='text-indent:2em; '>在2015年,为了使正版化平台运行更加稳定,也为给广大用户带来更加的丰富和多彩的正版化软件体验,我们将会恪尽职守,通过我们的不懈努力,为打造一个高效而稳定的平台系统,我们在此承诺:</p>
                    //    <p style='text-indent:2em; '>一、接到问题咨询问题,10分钟相应,1个小时之内出解决方案,争取在最短时间解决问题。完善的问题追踪制度,从我们接到问题直到问题完全解决,全程跟踪问题解决状态。</p>
                    //    <p style='text-indent:2em; '>二、以专业的精神和积极的态度,以丰富的经验和娴熟的技术确保正版化平台不断的完善和改进。</p>
                    //    <p style='text-indent:2em; '>三、继续将我们提供的服务以月报的方式反馈给管理人员。</p>
                    //    <p style='text-indent:2em; '>四、诚约老师对我们的工作进行监督,有任何意见、建议可以随时向我们沟通,意见反馈及投诉电话:010-62382945-8007。</p>
                    //    <p></p>
                    //    <p style='text-indent:2em;font-weight:bold; '>以下为{1}全年为您提供过的服务记录报告:</p>
                    //    <p style='text-indent:2em; '>共接到贵单位用户服务请求{2}个,其中{3};详细服务记录请见附件。</p>
                    // <p></p>
                    //  <p style='text-indent:2em; '>2014已结束,令人期待的2015即将开始。环宇通达人不但要更好的服务客户,还要做到更多的创新与努力。敬请期待我们在2015中的表现!本邮件无需回复。</p>
                    //  <p style='text-indent:2em; '>感谢您一年中对我们工作的支持,环宇通达全体员工祝您,在2015年中工作顺利</p>", v.CC_EmailUserName, Convert.ToDateTime(strDate).ToString("yyyy年"), ds.Tables[0].Rows.Count, strTypeInfo);

                    //                }
                    //                else
                    //                {
                    //                    strFilesPath = "";
                    //                    strTitle = string.Format("{0}微软正版化平台{1}份服务报告", v.CC_Name, Convert.ToDateTime(strDate).ToString("yyyy年"));
                    //                    strBody = string.Format(@"{0},您好:<br /><br />
                    //    <p style='text-indent:2em; '>环宇通达公司微软正版化售后服务部,首先感谢您一直以来对我们的支持和鼓励。回望2014年,环宇通达是不断创新的一年。对于正版化平台:我们综合了历年来所有的服务项目与众多用户提出的宝贵意见,积极改善了正版化平台的诸多功能。对于售后服务:我们提供每月服务报告邮件通知、服务专线专人接听并解决用户问题、定期巡检及时排除客户平台故障、其它邮件和远程协助服务。</p>
                    //    <p style='text-indent:2em; '>在2015年,为了使正版化平台运行更加稳定,也为给广大用户带来更加的丰富和多彩的正版化软件体验,我们将会恪尽职守,通过我们的不懈努力,为打造一个高效而稳定的平台系统,我们在此承诺:</p>
                    //    <p style='text-indent:2em; '>一、接到问题咨询问题,10分钟相应,1个小时之内出解决方案,争取在最短时间解决问题。完善的问题追踪制度,从我们接到问题直到问题完全解决,全程跟踪问题解决状态。</p>
                    //    <p style='text-indent:2em; '>二、以专业的精神和积极的态度,以丰富的经验和娴熟的技术确保正版化平台不断的完善和改进。</p>
                    //    <p style='text-indent:2em; '>三、继续将我们提供的服务以月报的方式反馈给管理人员。</p>
                    //    <p style='text-indent:2em; '>四、诚约老师对我们的工作进行监督,有任何意见、建议可以随时向我们沟通,意见反馈及投诉电话:010-62382945-8007。</p>
                    //    <p></p>
                    //  <p style='text-indent:2em; '>2014已结束,令人期待的2015即将开始。环宇通达人不但要更好的服务客户,还要做到更多的创新与努力。敬请期待我们在2015中的表现!本邮件无需回复。</p>
                    //  <p style='text-indent:2em; '>感谢您一年中对我们工作的支持,环宇通达全体员工祝您,在2015年中工作顺利</p>", v.CC_EmailUserName, Convert.ToDateTime(strDate).ToString("yyyy年"));
                    //                }
                    #endregion
                    strBody = string.Format(@"{0},您好:<br /><br />
    <p style='text-indent:2em; '>环宇通达售后服务部,{1}份服务报告:</p>
    <p style='text-indent:2em; '>共接到贵单位用户服务请求{2}个,其中{3};详细服务记录请见附件。</p>  
    <p style='text-indent:2em; '>为了更好的为提供技术支持和帮助,我公司为微软正版化客户开通了服务专线:400-079-8616。所有与微软正版化软件平台相关的问题(如:正版化平台的使用和操作问题、激活问题等)均可来电请求协助解决,我公司将为您提供专业、高效的服务。
    <p style='text-indent:2em; '>在线常见问题库(可解决Windows 7激活报0xC004F035错误):http://www.hyitech.com/Error/CaActivehelp.html </p>
您会定期收到我公司提供的服务记录报告,有任何疑问请拨打服务专线咨询,本邮件无需回复。 </p>
    <p style='text-indent:2em; '>投诉电话:010-62364559转8007
</p>", v.CC_EmailUserName, Convert.ToDateTime(strDate).ToString("yyyy年MM月"), ds.Tables[0].Rows.Count, strTypeInfo);
                }
                else
                {
                    strFilesPath = "";
                    strTitle     = string.Format("{0}微软正版化平台{1}份服务报告", v.CC_Name, Convert.ToDateTime(strDate).ToString("yyyy年MM月"));
                    strBody      = string.Format(@"{0},您好:<br /><br />
    <p style='text-indent:2em; '>环宇通达售后服务部,截至到{1}底没有接到贵单位的问题反馈。</p>
    <p style='text-indent:2em; '>为了更好的为提供技术支持和帮助,我公司为微软正版化客户开通了服务专线:400-079-8616。所有与微软正版化软件平台相关的问题(如:正版化平台的使用和操作问题、激活问题等)均可来电请求协助解决,我公司将为您提供专业、高效的服务。</p>
    <p style='text-indent:2em; '>在线常见问题库(可解决Windows 7激活报0xC004F035错误):http://www.hyitech.com/Error/CaActivehelp.html  </p>
您会定期收到我公司提供的服务记录报告,有任何疑问请拨打服务专线咨询,本邮件无需回复。 </p>
    <p style='text-indent:2em; '>投诉电话:010-62364559转8007</p> ", v.CC_EmailUserName, Convert.ToDateTime(strDate).ToString("yyyy年MM月"));
                }
                string str = @"<br /><br /><br />    <p class='x_MsoNormal'>
        <span style='font-family: &quot; 微软雅黑&quot; ,&quot; sans-serif&quot;'>多谢支持</span><span
            lang='EN-US'></span></p>
    <p class='x_MsoNormal'>
        <span lang='EN-US'>&nbsp;</span></p>
    <p class='x_MsoNormal'>
        <b><span lang='EN-US' style='font-size: 10.0pt; font-family: 微软雅黑,sans-serif&quot;
            color: #1F497D'>Best regards</span></b></p>
    <table class='x_MsoNormalTable' border='0' cellspacing='0' cellpadding='0' style='border-collapse: collapse'>
        <tbody>
            <tr>
                <td width='93' valign='top' style='width: 69.9pt; border: none; border-right: dotted windowtext 1.0pt;
                    padding: 0cm 5.4pt 0cm 5.4pt'>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 12.0pt; line-height: 115%; font-family: 宋体;
                            color: #1F497D'>
                            <img id='x_图片_x0020_1' src='http://www.hyitech.com/logo.jpg' alt='说明: hytd' height='92'
                                width='89' border='0'></span></p>
                </td>
                <td width='497' valign='top' style='width: 372.9pt; padding: 0cm 5.4pt 0cm 5.4pt'>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span style='font-size: 10.0pt; line-height: 115%; font-family: 华文行楷; color: #1F497D'>
                            售后支持服务</span><span lang='EN-US' style='font-size: 10.0pt; line-height: 115%; color: #1F497D'><br>
                            </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>
                                | Fax:400-0798-616 | </span>
                    </p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>E-mail:
                        </span><u><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #0563C1'>
                            <a href='#'>[email protected]</a></span></u><span lang='EN-US' style='font-size: 8.5pt;
                                line-height: 115%; color: #1F497D'></span></p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>Web:
                        </span><span lang='EN-US'><a href='#' target='_blank'><span style='font-size: 8.5pt;
                            line-height: 115%'>http://www.hyitech.com</span></a></span><span lang='EN-US' style='font-size: 8.5pt;
                                line-height: 115%; color: #1F497D'>
                                <br>
                            </span><span style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>
                                北京环宇通达科技有限公司</span><span lang='DE' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'></span></p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'><span
                            style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>微软金牌合作伙伴
                        </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>
                            | </span><span style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>
                                教育行业解决方案专家 </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%;
                                    color: #1F497D'></span>
                    </p>
                </td>
            </tr>
        </tbody>
    </table>";
                strBody += str;
                //if (ds.Tables[0].Rows.Count > 0)
                //{
                if (bolIsTest)
                {
                    strTitle = "测试邮件:" + strTitle;
                }
                sendMail(mailTo, v.CC_EmailUserName, mailCC, mailBCC, strTitle, strBody, strFilesPath);
                //}
            }
        }
    }
Esempio n. 11
0
    private void SendMailInfoSet(bool bolIsTest, string mailTo, string mailCC, string mailBCC, string strDate)
    {
        string strTitle     = string.Empty;
        string strBody      = string.Empty;
        string strFilesPath = string.Empty;
        string mailCCTO     = mailCC;

        HYTD.BLL.Call_CustomerBLL   bll           = new HYTD.BLL.Call_CustomerBLL();
        Models.Call_Customer        mCustomer     = new Models.Call_Customer();
        List <Models.Call_Customer> mCustomerList = new List <Models.Call_Customer>();

        mCustomerList = bll.GetCall_CustomerList().Where(c => c.CC_IsSend == 1).ToList();
        int i = 0;

        foreach (var v in mCustomerList)
        {
            //i++;
            //if (i > 2)
            //    break;
            if (v.CC_Status > 0 && v.CC_Email != null && v.CC_Email.Trim().Length > 0)
            {
                if (!bolIsTest)
                {
                    mailTo = mailCC = "";
                    mailTo = v.CC_Email;
                    if (mailCCTO.Length > 0)
                    {
                        mailCC = v.CC_CCEmail + "," + mailCCTO;
                    }
                    //密送给所属工程师
                    if (v.CC_Owner == "29")
                    {
                        mailBCC += ",[email protected]";
                    }
                    else if (v.CC_Owner == "37")
                    {
                        mailBCC += ",[email protected]";
                    }
                    else if (v.CC_Owner == "54")
                    {
                        mailBCC += ",[email protected]";
                    }
                    else
                    {
                        mailBCC += ",[email protected]";
                    }
                }
                else
                {
                    if (v.CC_Owner == "29")
                    {
                        mailTo = "*****@*****.**";
                    }
                    else if (v.CC_Owner == "37")
                    {
                        mailTo = "*****@*****.**";
                    }
                    else if (v.CC_Owner == "43")
                    {
                        mailTo = "*****@*****.**";
                    }
                    else
                    {
                        mailTo = "*****@*****.**";
                    }
                }
                //获取附件 如果没有附件则不添加
                DataSet ds = new DataSet();
                HYTD.BLL.Call_WorkBillBLL bllworkbill = new HYTD.BLL.Call_WorkBillBLL();
                string strWhere = string.Format("CWB_CCID={0} and convert(varchar(7),CWB_CreateTime,120)='{1}'", v.CC_ID, strDate.Substring(0, 7));
                ds = bllworkbill.ImportExcelCustomerWorkBill(strWhere);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    strFilesPath = getFile(ds.Tables[0]);
                    string strTypeInfo = string.Empty;
                    strTypeInfo = getTypeInfo(ds.Tables[1]);
                    strTitle    = string.Format("{0}微软正版化平台{1}份服务报告", v.CC_Name, Convert.ToDateTime(strDate).ToString("yyyy年MM月"));
                    strBody     = string.Format(@"{0},您好:<br /><br />
    <p style='text-indent:2em; '>环宇通达售后服务部,{1}份服务报告:</p>
    <p style='text-indent:2em; '>共接到贵单位用户服务请求{2}个,其中{3};详细服务记录请见附件。</p>  
    <p style='text-indent:2em; '>为了更好的为提供技术支持和帮助,我公司为微软正版化客户开通了服务专线:400-079-8616。所有与微软正版化软件平台相关的问题(如:正版化平台的使用和操作问题、激活问题等)均可来电请求协助解决,我公司将为您提供专业、高效的服务。
    <p style='text-indent:2em; '>在线常见问题库(可解决Windows 7激活报0xC004F035错误):http://www.hyitech.com/Error/CaActivehelp.html </p>
您会定期收到我公司提供的服务记录报告,有任何疑问请拨打服务专线咨询,本邮件无需回复。 </p>
    <p style='text-indent:2em; '>投诉电话:010-62364559转8007
</p>", v.CC_EmailUserName, Convert.ToDateTime(strDate).ToString("yyyy年MM月"), ds.Tables[0].Rows.Count, strTypeInfo);
                }
                else
                {
                    strFilesPath = "";
                    strTitle     = string.Format("{0}微软正版化平台{1}份服务报告", v.CC_Name, Convert.ToDateTime(strDate).ToString("yyyy年MM月"));
                    strBody      = string.Format(@"{0},您好:<br /><br />
    <p style='text-indent:2em; '>环宇通达售后服务部,截至到{1}底没有接到贵单位的问题反馈。</p>
    <p style='text-indent:2em; '>为了更好的为提供技术支持和帮助,我公司为微软正版化客户开通了服务专线:400-079-8616。所有与微软正版化软件平台相关的问题(如:正版化平台的使用和操作问题、激活问题等)均可来电请求协助解决,我公司将为您提供专业、高效的服务。</p>
    <p style='text-indent:2em; '>在线常见问题库(可解决Windows 7激活报0xC004F035错误):http://www.hyitech.com/Error/CaActivehelp.html  </p>
您会定期收到我公司提供的服务记录报告,有任何疑问请拨打服务专线咨询,本邮件无需回复。 </p>
    <p style='text-indent:2em; '>投诉电话:010-62364559转8007</p> ", v.CC_EmailUserName, Convert.ToDateTime(strDate).ToString("yyyy年MM月"));
                }

                string str = @"<br /><br /><br />    <p class='x_MsoNormal'>
        <span style='font-family: &quot; 微软雅黑&quot; ,&quot; sans-serif&quot;'>多谢支持</span><span
            lang='EN-US'></span></p>
    <p class='x_MsoNormal'>
        <span lang='EN-US'>&nbsp;</span></p>
    <p class='x_MsoNormal'>
        <b><span lang='EN-US' style='font-size: 10.0pt; font-family: 微软雅黑,sans-serif&quot;
            color: #1F497D'>Best regards</span></b></p>
    <table class='x_MsoNormalTable' border='0' cellspacing='0' cellpadding='0' style='border-collapse: collapse'>
        <tbody>
            <tr>
                <td width='93' valign='top' style='width: 69.9pt; border: none; border-right: dotted windowtext 1.0pt;
                    padding: 0cm 5.4pt 0cm 5.4pt'>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 12.0pt; line-height: 115%; font-family: 宋体;
                            color: #1F497D'>
                            <img id='x_图片_x0020_1' src='http://www.hyitech.com/logo.jpg' alt='说明: hytd' height='92'
                                width='89' border='0'></span></p>
                </td>
                <td width='497' valign='top' style='width: 372.9pt; padding: 0cm 5.4pt 0cm 5.4pt'>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span style='font-size: 10.0pt; line-height: 115%; font-family: 华文行楷; color: #1F497D'>
                            售后支持服务</span><span lang='EN-US' style='font-size: 10.0pt; line-height: 115%; color: #1F497D'><br>
                            </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>
                                | Fax:400-0798-616 | </span>
                    </p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>E-mail:
                        </span><u><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #0563C1'>
                            <a href='#'>[email protected]</a></span></u><span lang='EN-US' style='font-size: 8.5pt;
                                line-height: 115%; color: #1F497D'></span></p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'>
                        <span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>Web:
                        </span><span lang='EN-US'><a href='#' target='_blank'><span style='font-size: 8.5pt;
                            line-height: 115%'>http://www.hyitech.com</span></a></span><span lang='EN-US' style='font-size: 8.5pt;
                                line-height: 115%; color: #1F497D'>
                                <br>
                            </span><span style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>
                                北京环宇通达科技有限公司</span><span lang='DE' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'></span></p>
                    <p class='x_MsoNormal' style='line-height: 115%;margin:5px'><span
                            style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>微软金牌合作伙伴
                        </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%; color: #1F497D'>
                            | </span><span style='font-size: 8.5pt; line-height: 115%; font-family: 宋体; color: #1F497D'>
                                教育行业解决方案专家 </span><span lang='EN-US' style='font-size: 8.5pt; line-height: 115%;
                                    color: #1F497D'></span>
                    </p>
                </td>
            </tr>
        </tbody>
    </table>";
                strBody += str;
                //if (ds.Tables[0].Rows.Count > 0)
                //{
                if (bolIsTest)
                {
                    strTitle = "测试邮件:" + strTitle;
                }
                sendMail(mailTo, v.CC_EmailUserName, mailCC, mailBCC, strTitle, strBody, strFilesPath);
                //}
            }
        }
    }