Beispiel #1
0
        public ReturnValue<USR_CustomerShow> AddComment(int AnswerSysNo, int CustomerSysNo, int QuestionSysNo, string Context)
        {
            QA_CommentMod m_comment = new QA_CommentMod();
            m_comment.AnswerSysNo = AnswerSysNo;
            m_comment.Context = AppCmn.CommonTools.SystemInputFilter(Context.DoTrim());
            m_comment.DR = (int)AppEnum.State.normal;
            m_comment.QuestionSysNo = QuestionSysNo;
            m_comment.TS = DateTime.Now;
            m_comment.CustomerSysNo = CustomerSysNo;
            QA_CommentBll.GetInstance().AddComment(m_comment);

            USR_CustomerShow ret = new USR_CustomerShow();
            USR_CustomerBll.GetInstance().GetModel(CustomerSysNo).MemberwiseCopy(ret);
            return ReturnValue<USR_CustomerShow>.Get200OK(ret);
        }
Beispiel #2
0
        public ReturnValue<USR_CustomerShow> AddAnswer(int CustomerSysNo, int QuestionSysNo, string Title, string Context)
        {
            QA_AnswerMod m_answer = new QA_AnswerMod();
            m_answer.Award = 0;
            m_answer.Title = Title;
            m_answer.Context = AppCmn.CommonTools.SystemInputFilter(Context.DoTrim());
            m_answer.CustomerSysNo = CustomerSysNo;
            m_answer.DR = (int)AppEnum.State.normal;
            m_answer.Hate = 0;
            m_answer.Love = 0;
            m_answer.QuestionSysNo = QuestionSysNo;
            m_answer.Title = "";
            m_answer.TS = DateTime.Now;
            QA_AnswerBll.GetInstance().AddAnswer(m_answer);

            USR_CustomerShow ret = new USR_CustomerShow();
            USR_CustomerBll.GetInstance().GetModel(CustomerSysNo).MemberwiseCopy(ret);
            return ReturnValue<USR_CustomerShow>.Get200OK(ret);
        }
Beispiel #3
0
        public ReturnValue<USR_CustomerShow> AddQuestionWithChart(Stream openPageData)
        {
            QA_QuestionInput<FATE_ChartMod> input;
            //try
            //{
            int nReadCount = 0;
            MemoryStream ms = new MemoryStream();
            byte[] buffer = new byte[1024];
            while ((nReadCount = openPageData.Read(buffer, 0, 1024)) > 0)
            {
                ms.Write(buffer, 0, nReadCount);
            }
            byte[] byteJson = ms.ToArray();
            string textJson = System.Text.Encoding.UTF8.GetString(byteJson);

            input = XMS.Core.Json.JsonSerializer.Deserialize<QA_QuestionInput<FATE_ChartMod>>(textJson);

            if (input == null)
            {
                throw new BusinessException("参数有误");
            }
            //}
            //catch (Exception ex)
            //{
            //    throw ex;
            //}

            #region 判断输入项
            if (input.CateSysNo == 0 || input.CateSysNo == AppConst.IntNull)
            {
                throw new BusinessException("请选择分类");
            }
            if (input.Title.DoTrim() == "")
            {
                throw new BusinessException("请输入标题");
            }
            if (input.Title.DoTrim().Length > 30)
            {
                throw new BusinessException("您输入的标题太长,请控制在30字以内");
            }
            int point = USR_CustomerBll.GetInstance().GetModel(input.CustomerSysNo).Point;
            if (input.Award > point && point != AppConst.IntNull)
            {
                throw new BusinessException("您最多可用" + point + "积分");
            }

            #endregion

            //try
            //{
            QA_QuestionMod m_quest = new QA_QuestionMod();
            m_quest.Award = input.Award;
            m_quest.CateSysNo = input.CateSysNo;
            m_quest.Context = SQLData.SQLFilter(AppCmn.CommonTools.StringFilter(input.Context));
            m_quest.CustomerSysNo = input.CustomerSysNo;
            m_quest.LastReplyTime = DateTime.Now;
            m_quest.ReplyCount = 0;
            m_quest.ReadCount = 0;
            m_quest.BuyCount = 0;
            m_quest.OrderCount = 0;
            m_quest.Title = AppCmn.CommonTools.SystemInputFilter(input.Title);
            m_quest.TS = DateTime.Now;
            m_quest.DR = (int)AppEnum.State.normal;

            int sysno = 0;

            QA_QuestionBll.GetInstance().AddQuest(ref m_quest, true);
            sysno = m_quest.SysNo;
            if (input.Chart.Count > 0)
            {
                FATE_ChartMod m_chart = new FATE_ChartMod();
                m_chart.CharType = input.Chart[0].CharType; ;
                if (m_chart.CharType != (int)AppEnum.ChartType.nochart)
                {
                    m_chart.FirstBirth = input.Chart[0].FirstBirth;
                    m_chart.FirstPoi = input.Chart[0].FirstPoi;
                    m_chart.Transit = DateTime.Now;
                    m_chart.TransitPoi = input.Chart[0].FirstPoi;
                    m_chart.TheoryType = 0;
                    m_chart.FirstPoiName = input.Chart[0].FirstPoiName;
                    m_chart.FirstTimeZone = -8;
                    m_chart.FirstGender = input.Chart[0].FirstGender;
                    m_chart.FirstDayLight = input.Chart[0].FirstDayLight;
                    if (m_chart.CharType == (int)AppEnum.ChartType.relation)
                    {
                        m_chart.SecondBirth = input.Chart[0].SecondBirth;
                        m_chart.SecondPoi = input.Chart[0].SecondPoi;
                        m_chart.SecondPoiName = input.Chart[0].SecondPoiName;
                        m_chart.SecondTimeZone = -8;
                        m_chart.SecondGender = input.Chart[0].SecondGender;
                        m_chart.SecondDayLight = input.Chart[0].SecondDayLight;
                    }
                    m_chart.TS = DateTime.Now;
                    m_chart.DR = (int)AppEnum.State.normal;
                    int fatesysno = FATE_ChartBll.GetInstance().Add(m_chart);

                    REL_Question_ChartMod m_qchart = new REL_Question_ChartMod();
                    m_qchart.Chart_SysNo = fatesysno;
                    m_qchart.Question_SysNo = sysno;
                    REL_Question_ChartBll.GetInstance().Add(m_qchart);
                }
            }
            //}
            //catch (Exception ex)
            //{
            //    throw ex;
            //}

            USR_CustomerShow ret = new USR_CustomerShow();
            USR_CustomerBll.GetInstance().GetModel(input.CustomerSysNo).MemberwiseCopy(ret);
            return ReturnValue<USR_CustomerShow>.Get200OK(ret);
        }
Beispiel #4
0
        public ReturnValue<PageInfo<QA_AnswerShow>> GetAnswerByQuest(int pagesize, int pageindex, int sysno)
        {
            int total = 0;
            DataTable m_dt = QA_AnswerBll.GetInstance().GetListByQuest(pagesize, pageindex, sysno, ref total);
            List<QA_AnswerShow> ret = new List<QA_AnswerShow>();
            PageInfo<QA_AnswerShow> rett = new PageInfo<QA_AnswerShow>();
            if (m_dt == null || m_dt.Rows.Count == 0)
            {
                rett.List = ret;
                rett.Total = total;
                rett.HasNextPage = false;
                return ReturnValue<PageInfo<QA_AnswerShow>>.Get200OK(rett);
            }

            for (int i = 0; i < m_dt.Rows.Count; i++)
            {
                QA_AnswerShow tmp_answer = MapQA_AnswerShow(m_dt.Rows[i]);
                USR_CustomerShow tmpu = new USR_CustomerShow();
                USR_CustomerBll.GetInstance().GetModel(tmp_answer.CustomerSysNo).MemberwiseCopy(tmpu);
                tmp_answer.Customer = tmpu;
                DataTable tmp_dt = QA_CommentBll.GetInstance().GetListByAnswer(tmp_answer.SysNo);
                if (tmp_dt != null && tmp_dt.Rows.Count > 0)
                {
                    List<QA_CommentShow> commentlist = new List<QA_CommentShow>();
                    for (int j = 0; j < tmp_dt.Rows.Count && j <= 3; j++)
                    {
                        QA_CommentShow tmp_comment = MapQA_CommentShow(tmp_dt.Rows[j]);
                        USR_CustomerMaintain tmpuu = new USR_CustomerMaintain();
                        USR_CustomerBll.GetInstance().GetModel(tmp_comment.CustomerSysNo).MemberwiseCopy(tmpuu);
                        tmp_comment.Customer = tmpuu;
                        commentlist.Add(tmp_comment);
                    }
                    tmp_answer.TopComments = commentlist;
                    tmp_answer.ToalComment = tmp_dt.Rows.Count;
                    if (tmp_dt.Rows.Count > 3)
                    {
                        tmp_answer.HasMoreComment = true;
                    }
                    else
                    {
                        tmp_answer.HasMoreComment = false;
                    }
                }
                ret.Add(tmp_answer);
            }

            rett.List = ret;
            rett.Total = total;
            if (pagesize * pageindex >= total)
            {
                rett.HasNextPage = false;
            }
            else
            {
                rett.HasNextPage = true;
            }
            return ReturnValue<PageInfo<QA_AnswerShow>>.Get200OK(rett);
        }
Beispiel #5
0
        public ReturnValue<QA_QuestionShow<ZiWeiMod>> GetQuestionForZiWei(int sysno)
        {
            QA_QuestionMod tmp = QA_QuestionBll.GetInstance().GetModel(sysno);
            QA_QuestionShow<ZiWeiMod> ret = new QA_QuestionShow<ZiWeiMod>();
            tmp.MemberwiseCopy(ret);

            USR_CustomerShow tmpu = new USR_CustomerShow();
            USR_CustomerBll.GetInstance().GetModel(ret.CustomerSysNo).MemberwiseCopy(tmpu);
            ret.Customer = tmpu;
            #region 设置命盘
            int[] _paras = { 1, 1, 0, 1 };
            FATE_ChartMod m_chart = QA_QuestionBll.GetInstance().GetChartByQuest(ret.SysNo);
            if (m_chart != null)
            {
                ZiWeiMod m_ziwei = new ZiWeiMod();
                #region 设置实体各种参数
                //默认做太阳时修正
                string[] tmplatlng = m_chart.FirstPoi.ToString().Split(new char[] { '|' });
                m_ziwei.BirthTime = new DateEntity(PublicDeal.GetInstance().RealTime(DateTime.Parse(m_chart.FirstBirth.ToString()),
                    new LatLng(tmplatlng[1], tmplatlng[0], m_chart.FirstPoiName)));
                m_ziwei.Gender = (AppEnum.Gender)int.Parse(m_chart.FirstGender.ToString());
                m_ziwei.RunYue = PublicValue.ZiWeiRunYue.dangxia;
                m_ziwei.TransitTime = new DateEntity(DateTime.Now);
                #endregion
                m_ziwei = ZiWeiBiz.GetInstance().TimeToZiWei(m_ziwei.BirthTime, m_ziwei.Gender, _paras);
                ret.Chart.Add(m_ziwei);

                if (m_chart.CharType.ToString() == ((int)AppEnum.ChartType.relation).ToString())
                {
                    ZiWeiMod m_ziwei1 = new ZiWeiMod();
                    #region 设置实体各种参数
                    tmplatlng = m_chart.SecondPoi.ToString().Split(new char[] { '|' });
                    m_ziwei1.BirthTime = new DateEntity(PublicDeal.GetInstance().RealTime(DateTime.Parse(m_chart.SecondBirth.ToString()),
                        new LatLng(tmplatlng[1], tmplatlng[0], m_chart.SecondPoiName)));
                    m_ziwei1.Gender = (AppEnum.Gender)int.Parse(m_chart.SecondGender.ToString());
                    m_ziwei1.RunYue = PublicValue.ZiWeiRunYue.dangxia;
                    m_ziwei1.TransitTime = new DateEntity(DateTime.Now);
                    #endregion
                    m_ziwei1 = ZiWeiBiz.GetInstance().TimeToZiWei(m_ziwei.BirthTime, m_ziwei.Gender, _paras);
                    ret.Chart.Add(m_ziwei1);
                }
            }
            #endregion
            return ReturnValue<QA_QuestionShow<ZiWeiMod>>.Get200OK(ret);
        }
Beispiel #6
0
        public ReturnValue<QA_QuestionShow<BaZiMod>> GetQuestionForBaZi(int sysno)
        {
            QA_QuestionMod tmp = QA_QuestionBll.GetInstance().GetModel(sysno);
            QA_QuestionShow<BaZiMod> ret = new QA_QuestionShow<BaZiMod>();
            tmp.MemberwiseCopy(ret);

            USR_CustomerShow tmpu = new USR_CustomerShow();
            USR_CustomerBll.GetInstance().GetModel(ret.CustomerSysNo).MemberwiseCopy(tmpu);
            ret.Customer = tmpu;
            #region 设置命盘
            FATE_ChartMod m_chart = QA_QuestionBll.GetInstance().GetChartByQuest(ret.SysNo);
            if (m_chart != null)
            {
                BaZiMod m_bazi = new BaZiMod();
                string[] tmplatlng = m_chart.FirstPoi.ToString().Split(new char[] { '|' });
                m_bazi.BirthTime = new DateEntity(PublicDeal.GetInstance().RealTime(DateTime.Parse(m_chart.FirstBirth.ToString()),
                    new LatLng(tmplatlng[1], tmplatlng[0], m_chart.FirstPoiName)));
                m_bazi.AreaName = m_chart.FirstPoiName.ToString();
                m_bazi.Longitude = tmplatlng[0];
                m_bazi.Gender = (AppEnum.Gender)m_chart.FirstGender;
                BaZiBiz.GetInstance().TimeToBaZi(ref m_bazi);
                ret.Chart.Add(m_bazi);
                if (m_chart.CharType.ToString() == ((int)AppEnum.ChartType.relation).ToString())
                {
                    BaZiMod m_bazi1 = new BaZiMod();
                    tmplatlng = m_chart.SecondPoi.ToString().Split(new char[] { '|' });
                    m_bazi1.BirthTime = new DateEntity(PublicDeal.GetInstance().RealTime(DateTime.Parse(m_chart.SecondBirth.ToString()),
                        new LatLng(tmplatlng[1], tmplatlng[0], m_chart.SecondPoiName)));
                    m_bazi1.AreaName = m_chart.SecondPoiName.ToString();
                    m_bazi1.Longitude = tmplatlng[0];
                    m_bazi1.Gender = (AppEnum.Gender)m_chart.SecondGender;
                    BaZiBiz.GetInstance().TimeToBaZi(ref m_bazi1);
                    ret.Chart.Add(m_bazi1);
                }
            }
            #endregion
            return ReturnValue<QA_QuestionShow<BaZiMod>>.Get200OK(ret);
        }
Beispiel #7
0
        public ReturnValue<QA_QuestionShow<AstroMod>> GetQuestionForAstro(int sysno)
        {
            QA_QuestionMod tmp = QA_QuestionBll.GetInstance().GetModel(sysno);
            QA_QuestionShow<AstroMod> ret = new QA_QuestionShow<AstroMod>();
            tmp.MemberwiseCopy(ret);

            USR_CustomerShow tmpu = new USR_CustomerShow();
            USR_CustomerBll.GetInstance().GetModel(ret.CustomerSysNo).MemberwiseCopy(tmpu);
            ret.Customer = tmpu;
            #region 设置星盘
            FATE_ChartMod m_chart = QA_QuestionBll.GetInstance().GetChartByQuest(ret.SysNo);
            if (m_chart != null)
            {
                AstroMod tmpastro = new AstroMod();

                if (m_chart.CharType.ToString() == ((int)AppEnum.ChartType.personal).ToString())
                {
                    #region 设置实体各种参数

                    tmpastro.type = PublicValue.AstroType.benming;
                    tmpastro.birth = DateTime.Parse(m_chart.FirstBirth.ToString());
                    tmpastro.Gender = (AppEnum.Gender)m_chart.FirstGender;
                    string[] tmplatlng = m_chart.FirstPoi.ToString().Split(new char[] { '|' });
                    tmpastro.position = new LatLng(tmplatlng[1], tmplatlng[0], m_chart.FirstPoiName);
                    if (m_chart.FirstDayLight.ToString() == ((int)AppEnum.BOOL.True).ToString())
                    {
                        tmpastro.IsDayLight = AppEnum.BOOL.True;
                    }
                    else
                    {
                        tmpastro.IsDayLight = AppEnum.BOOL.False;
                    }
                    tmpastro.zone = int.Parse(m_chart.FirstTimeZone.ToString());

                    #endregion
                }
                else if (m_chart.CharType.ToString() == ((int)AppEnum.ChartType.relation).ToString())
                {
                    #region 设置实体各种参数
                    tmpastro.type = PublicValue.AstroType.hepan;
                    tmpastro.compose = PublicValue.AstroZuhe.bijiao;
                    tmpastro.Gender = (AppEnum.Gender)m_chart.FirstGender;
                    tmpastro.Gender1 = (AppEnum.Gender)m_chart.SecondGender;
                    tmpastro.birth = DateTime.Parse(m_chart.FirstBirth.ToString());
                    string[] tmplatlng = m_chart.FirstPoi.ToString().Split(new char[] { '|' });
                    tmpastro.position = new LatLng(tmplatlng[1], tmplatlng[0], m_chart.FirstPoiName);
                    if (m_chart.FirstDayLight.ToString() == ((int)AppEnum.BOOL.True).ToString())
                    {
                        tmpastro.IsDayLight = AppEnum.BOOL.True;
                    }
                    else
                    {
                        tmpastro.IsDayLight = AppEnum.BOOL.False;
                    }
                    tmpastro.zone = int.Parse(m_chart.FirstTimeZone.ToString());
                    tmpastro.birth1 = DateTime.Parse(m_chart.SecondBirth.ToString());
                    tmplatlng = m_chart.SecondPoi.ToString().Split(new char[] { '|' });
                    tmpastro.position1 = new LatLng(tmplatlng[1], tmplatlng[0], m_chart.SecondPoiName);
                    if (m_chart.SecondDayLight.ToString() == ((int)AppEnum.BOOL.True).ToString())
                    {
                        tmpastro.IsDayLight1 = AppEnum.BOOL.True;
                    }
                    else
                    {
                        tmpastro.IsDayLight1 = AppEnum.BOOL.False;
                    }
                    tmpastro.zone1 = int.Parse(m_chart.SecondTimeZone.ToString());

                    #endregion
                }
                tmpastro.startsShow.Clear();
                for (int i = 1; i <= 30; i++)
                {
                    tmpastro.startsShow.Add(i, PublicValue.GetAstroStar((PublicValue.AstroStar)i));
                }
                tmpastro.aspectsShow.Clear();
                tmpastro.aspectsShow.Add(1, 0);
                tmpastro.aspectsShow.Add(2, 180);
                tmpastro.aspectsShow.Add(4, 120);
                tmpastro.aspectsShow.Add(3, 90);
                tmpastro.aspectsShow.Add(5, 60);
                tmpastro.graphicID = AstroBiz.GetInstance().SetGraphicID(tmpastro);
                if ((tmpastro.type == PublicValue.AstroType.hepan && tmpastro.compose == PublicValue.AstroZuhe.bijiao) || (tmpastro.type == PublicValue.AstroType.tuiyun && tmpastro.transit == PublicValue.AstroTuiyun.xingyun))
                {
                    AstroMod tmpinput = new AstroMod();
                    tmpinput.aspectsShow = tmpastro.aspectsShow;
                    tmpinput.startsShow = tmpastro.startsShow;
                    tmpinput.birth = tmpastro.birth;
                    tmpinput.position = tmpastro.position;
                    tmpinput.IsDayLight = tmpastro.IsDayLight;
                    tmpinput.zone = tmpastro.zone;
                    AstroBiz.GetInstance().GetParamters(ref tmpinput);
                    tmpastro.Stars = tmpinput.Stars;

                    tmpinput = new AstroMod();
                    tmpinput.aspectsShow = tmpastro.aspectsShow;
                    tmpinput.startsShow = tmpastro.startsShow;
                    tmpinput.birth = tmpastro.birth1;
                    tmpinput.position = tmpastro.position1;
                    tmpinput.IsDayLight = tmpastro.IsDayLight1;
                    tmpinput.zone = tmpastro.zone1;
                    AstroBiz.GetInstance().GetParamters(ref tmpinput);
                    tmpastro.Stars1 = tmpinput.Stars;
                }
                else
                {
                    AstroBiz.GetInstance().GetParamters(ref tmpastro);
                    tmpastro.Stars1 = null;
                }
                ret.Chart.Add(tmpastro);
            }
            #endregion
            return ReturnValue<QA_QuestionShow<AstroMod>>.Get200OK(ret);
        }
Beispiel #8
0
        public USR_CustomerShow MapUSR_CustomerShow(DataRow input)
        {
            USR_CustomerShow ret = new USR_CustomerShow();
            if (input["BestAnswer"].ToString() != "")
            {
                ret.BestAnswer = int.Parse(input["BestAnswer"].ToString());
            }
            if (input["birth"].ToString() != "")
            {
                ret.Birth = DateTime.Parse(input["birth"].ToString());
            }
            else
            {
                ret.Birth = AppConst.DateTimeNull;
            }
            if (input["Credit"].ToString() != "")
            {
                ret.Credit = int.Parse(input["Credit"].ToString());
            }
            if (input["Exp"].ToString() != "")
            {
                ret.Exp = int.Parse(input["Exp"].ToString());
            }
            if (input["FateType"].ToString() != "")
            {
                ret.FateType = int.Parse(input["FateType"].ToString());
            }
            if (input["Gender"].ToString() != "")
            {
                ret.Gender = int.Parse(input["Gender"].ToString());
            }
            if (input["GradeSysNo"].ToString() != "")
            {
                ret.GradeSysNo = int.Parse(input["GradeSysNo"].ToString());
            }
            if (input["HasNewInfo"].ToString() != "")
            {
                ret.HasNewInfo = int.Parse(input["HasNewInfo"].ToString());
            }
            if (input["HomeTown"].ToString() != "")
            {
                ret.HomeTown = int.Parse(input["HomeTown"].ToString());
            }
            ret.Intro = input["Intro"].ToString();
            if (input["IsShowBirth"].ToString() != "")
            {
                ret.IsShowBirth = int.Parse(input["IsShowBirth"].ToString());
            }
            if (input["IsStar"].ToString() != "")
            {
                ret.IsStar = int.Parse(input["IsStar"].ToString());
            }
            if (input["LastLoginTime"].ToString() != "")
            {
                ret.LastLoginTime = DateTime.Parse(input["LastLoginTime"].ToString());
            }
            else
            {
                ret.LastLoginTime = AppConst.DateTimeNull;
            }
            ret.NickName = input["NickName"].ToString();
            ret.Photo = input["Photo"].ToString();
            if (input["Point"].ToString() != "")
            {
                ret.Point = int.Parse(input["Point"].ToString());
            }
            if (input["RegTime"].ToString() != "")
            {
                ret.RegTime = DateTime.Parse(input["RegTime"].ToString());
            }
            else
            {
                ret.RegTime = AppConst.DateTimeNull;
            }
            ret.Signature = input["Signature"].ToString();
            if (input["Status"].ToString() != "")
            {
                ret.Status = int.Parse(input["Status"].ToString());
            }
            if (input["SysNo"].ToString() != "")
            {
                ret.SysNo = int.Parse(input["SysNo"].ToString());
            }
            if (input["TotalAnswer"].ToString() != "")
            {
                ret.TotalAnswer = int.Parse(input["TotalAnswer"].ToString());
            }
            if (input["TotalQuest"].ToString() != "")
            {
                ret.TotalQuest = int.Parse(input["TotalQuest"].ToString());
            }
            if (input["TotalReply"].ToString() != "")
            {
                ret.TotalReply = int.Parse(input["TotalReply"].ToString());
            }
            if (input["TotalTalk"].ToString() != "")
            {
                ret.TotalTalk = int.Parse(input["TotalTalk"].ToString());
            }
            if (input["TotalTalkReply"].ToString() != "")
            {
                ret.TotalTalkReply = int.Parse(input["TotalTalkReply"].ToString());
            }
                ret.Phone = input["Phone"].ToString();
            if (input["SetOrderCount"].ToString() != "")
            {
                ret.SetOrderCount = int.Parse(input["SetOrderCount"].ToString());
            }
            if (input["BuyOrderCount"].ToString() != "")
            {
                ret.BuyOrderCount = int.Parse(input["BuyOrderCount"].ToString());
            }
             if (input["SellOrderCount"].ToString() != "")
            {
                ret.SellOrderCount = int.Parse(input["SellOrderCount"].ToString());
            }
             if (input["TotalSellRMB"].ToString() != "")
            {
                ret.TotalSellRMB = int.Parse(input["TotalSellRMB"].ToString());
            }
             if (input["TotalBuyRMB"].ToString() != "")
            {
                ret.TotalBuyRMB = int.Parse(input["TotalBuyRMB"].ToString());
            }
             if (input["TotalBuyPoint"].ToString() != "")
            {
                ret.TotalBuyPoint = int.Parse(input["TotalBuyPoint"].ToString());
            }

            return ret;
        }
Beispiel #9
0
 public ReturnValue<USR_CustomerShow> GetUserInfo(int uid)
 {
     USR_CustomerMod m_user = USR_CustomerBll.GetInstance().GetModel(uid);
     if (m_user.SysNo != -999999)
     {
         USR_CustomerShow ret = new USR_CustomerShow();
         m_user.MemberwiseCopy(ret);
         DataTable m_dt = REL_Customer_MedalBll.GetInstance().GetMedalByCustomer(uid, 0);
         ret.TotalMedal = m_dt.Rows.Count;
         int total = 0;
         DataTable m_dt1 = USR_MessageBll.GetInstance().GetMessageByCustomer(uid, 1, 1, 0, 1, ref total);
         ret.NewMessage = total;
         return ReturnValue<USR_CustomerShow>.Get200OK(ret);
     }
     else
     {
         throw new BusinessException("用户ID错误,请重新输入!");
     }
 }