Esempio n. 1
0
    private void getDateModel(int intCID)
    {
        cModel = ccBll.GetCall_CustomerEntity(intCID);
        if (intCID > 0)
        {
            intCounts = WBll.GetCall_WorkBillCounts(CID);
        }
        strForUser = PublicMethod.UserInfoList(cModel.CC_Owner);
        int       intCount = 0;
        DataTable dt       = WBll.GetCall_WorkBillList("CWB_CCID=" + CID, 1, 1, "CWB_ID desc", out intCount);

        if (dt.Rows.Count > 0)
        {
            DateTime dtime = DateTime.MinValue;
            DateTime.TryParse(dt.Rows[0]["CWB_CreateTime"].ToString().Trim(), out dtime);
            strLastServiceTime = dtime.ToString("yyyy-MM-dd HH:mm");
        }
    }
Esempio n. 2
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. 3
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. 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)
        {
            //获取工单信息
            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. 5
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;
    }