Пример #1
0
    private void getDataBind()
    {
        StringBuilder sbContent = new StringBuilder();
        UserInfoBLL   uBll      = new UserInfoBLL();

        HYTD.BLL.Call_WorkBillHistoryBLL   bll  = new HYTD.BLL.Call_WorkBillHistoryBLL();
        List <Models.Call_WorkBillHistory> list = new List <Models.Call_WorkBillHistory>();

        list = bll.GetCall_WorkBillHistoryList().Where(c => c.CWBH_CWB_ID == WID).ToList();
        foreach (var m in list)
        {
            sbContent.AppendFormat("<tbody>");
            sbContent.AppendFormat("<tr>");
            sbContent.AppendFormat("<td class=\"by\" title=\"{0}\">{0}&nbsp;</td>", m.CWBH_Description);
            sbContent.AppendFormat("<td class=\"by\" title=\"{0}\">{0}&nbsp;</td>", m.CWBH_Solution);
            sbContent.AppendFormat("<td class=\"by\" title=\"{0}\">{0}&nbsp;</td>", m.CWBH_Remark);
            sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", PublicEnum.GetEnumDescription <PublicEnum.CallWorkBillStatus>(m.CWBH_Status.ToString()));
            sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", m.CWBH_OperationTime);
            sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", uBll.GetUserInfoEntityByUserCode(m.CWBH_UserID.Value));
            int intUserID = 0;
            if (m.CWBH_OperationUser != null)
            {
                intUserID = m.CWBH_OperationUser.Value;
            }
            sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", uBll.GetUserInfoEntityByUserCode(intUserID));
            sbContent.AppendFormat("</tr>");
            sbContent.AppendFormat("</tbody>");
        }

        script = sbContent.ToString();
    }
Пример #2
0
        public bool AddANDUpdataCallWorkBill(Call_WorkBill entity, int intHF)
        {
            bool bolRet = false;

            if (intHF > 0)
            {
                BLL.Call_VisitBillBLL CVBBbll = new BLL.Call_VisitBillBLL();
                Call_VisitBill        entity1 = new Call_VisitBill();

                entity1.CVB_CallInEmail    = entity.CWB_CallInEmail;
                entity1.CVB_CallInTel      = entity.CWB_CallInTel;
                entity1.CVB_CallInUserName = entity.CWB_CallInUserName;
                entity1.CVB_CallType       = entity.CWB_CallType;
                entity1.CVB_CCID           = entity.CWB_CCID;
                entity1.CVB_Creater        = entity.CWB_Creater;
                entity1.CVB_CreateTime     = entity.CWB_OperationTime.Value;
                entity1.CVB_Description    = entity.CWB_Description;
                entity1.CVB_ForUser        = entity.CWB_ForUser;
                entity1.CVB_OperationTime  = entity.CWB_OperationTime;
                entity1.CVB_OperationUser  = entity.CWB_OperationUser;
                entity1.CVB_Remark         = entity.CWB_Remark;
                entity1.CVB_ServiceType    = entity.CWB_ServiceType;
                entity1.CVB_SoftType       = entity.CWB_SoftType;
                entity1.CVB_Solution       = entity.CWB_Solution;
                entity1.CVB_Status         = entity.CWB_Status;
                entity1.CVB_Type           = entity.CWB_Type;
                entity1.CVB_ID             = 0;
                entity1.CVB_CWB_ID         = entity.CWB_ID;
                CVBBbll.AddCall_VisitBill(entity1);
            }
            else
            {
                if (entity.CWB_ID > 0)
                {
                    UpdateCall_WorkBill(entity);
                }
                else
                {
                    AddCall_WorkBill(entity);
                }
            }
            Call_WorkBillHistoryBLL cwbhBll = new Call_WorkBillHistoryBLL();
            Call_WorkBillHistory    model   = new Call_WorkBillHistory();

            model.CWBH_CWB_ID        = entity.CWB_ID;
            model.CWBH_Description   = entity.CWB_Description;
            model.CWBH_OperationTime = entity.CWB_OperationTime;
            model.CWBH_Solution      = entity.CWB_Solution;
            model.CWBH_Status        = entity.CWB_Status;
            model.CWBH_UserID        = entity.CWB_ForUser;
            model.CWBH_OperationUser = entity.CWB_OperationUser;
            model.CWBH_Remark        = entity.CWB_Remark;
            cwbhBll.AddCall_WorkBillHistory(model);
            return(bolRet);
        }