Beispiel #1
0
        //申请
        public string FP8010506(string u002Str, string pwd)
        {
            string userSN = session["userSN"].ToString();
            //string userSN = "U00004";

            U002 consultantSvrObj = C101.FC10108(u002Str, typeof(U002)) as U002;

            using (DBMA1DataContext dbma1 = new DBMA1DataContext())
            {
                //密码是否正确
                if (C201.FC20146(dbma1, userSN, pwd) == false)
                {
                    return("0");
                }

                //扣款
                A025 a025 = dbma1.A025s.First();
                if (C201.FC20147(dbma1, userSN, Convert.ToDecimal(a025.openServerCost), "顾问申请", null) == false)
                {
                    return("0");
                }

                //更新用户信息基本表 U002
                ConcultantSvrUpdateU002(dbma1, consultantSvrObj, userSN);

                //更新服务表 U001
                ConcultantSvrUpdateU001(dbma1, userSN);

                //更新顾问申请备案表 U006
                ConsultantSvrApplyRecUpdateU006(dbma1, consultantSvrObj, userSN);

                //加入成长值表 F006
                string F006Max33SN = C101.FC10102("F006", 7, "UD");
                F006   f006        = new F006();
                f006.groupUpSN              = F006Max33SN;
                f006.userSN                 = userSN;
                f006.businessSN             = userSN;
                f006.businessType           = "顾问申请";
                f006.transactionMoneyAmount = Convert.ToDecimal(a025.openServerCost);
                f006.groupUpValue           = a025.openServerCost;
                f006.acquireDate            = DateTime.Now;
                dbma1.F006s.InsertOnSubmit(f006);

                dbma1.SubmitChanges();

                return("1");
            }
        }
Beispiel #2
0
        //0:成功。1:密码错误。2:余额不足
        public string FP30103(string assetsData, string pwd)
        {
            string userSN = session["userSN"].ToString();
            //string userSN = "U00003";

            P300 assetsDataObj = C101.FC10108(assetsData, typeof(P300)) as P300;

            using (DBMA1DataContext dbma1 = new DBMA1DataContext())
            {
                //密码是否正确
                if (C201.FC20146(dbma1, userSN, pwd) == false)
                {
                    return("{\"resStatus\":\"1\"}");
                }

                //余额是否充足
                decimal publishAssetsFee = Convert.ToDecimal(dbma1.A027s.First().publishAssetsCost);
                //扣款
                if (C201.FC20147(dbma1, userSN, publishAssetsFee, "资产发布", null) == false)
                {
                    return("{\"resStatus\":\"2\"}");
                }

                //加入资产表 P300
                string max33SN = C101.FC10102("P300", 6, "G");
                assetsDataObj.assetsSN        = max33SN;
                assetsDataObj.publisherUserSN = userSN;
                assetsDataObj.publishDate     = DateTime.Now;
                dbma1.P300s.InsertOnSubmit(assetsDataObj);

                //加入成长值表 F006
                F006 f006 = new F006();
                f006.groupUpSN              = C101.FC10102("F006", 7, "UD");
                f006.userSN                 = userSN;
                f006.businessSN             = max33SN;
                f006.businessType           = "资产发布";
                f006.transactionMoneyAmount = publishAssetsFee;
                f006.groupUpValue           = publishAssetsFee;
                f006.acquireDate            = DateTime.Now;
                dbma1.F006s.InsertOnSubmit(f006);

                dbma1.SubmitChanges();

                string assetsDataStr = C101.FC10107(dbma1.VP301001s.Where(c => c.assetsSN == max33SN).First() as VP301001);

                return(string.Format("{{\"resStatus\":\"{0}\",\"assetsData\":{1}}}", "0", assetsDataStr));
            }
        }
Beispiel #3
0
        //申请 P802010304
        public string FP802010304(string SellingSvrData, string pwd)
        {
            string userSN = session["userSN"].ToString();

            U002 svrObj = C101.FC10108(SellingSvrData, typeof(U002)) as U002;

            using (DBMA1DataContext dbma1 = new DBMA1DataContext())
            {
                //密码是否正确
                if (C201.FC20146(dbma1, userSN, pwd) == false)
                {
                    return("0");
                }

                //扣款
                A027 a027 = dbma1.A027s.First();
                if (C201.FC20147(dbma1, userSN, Convert.ToDecimal(a027.openServerCost), "出售申请", null) == false)
                {
                    return("0");
                }

                //更新用户信息基本表 U002
                SellSvrUpdateU002(dbma1, svrObj, userSN);

                //更新服务表 U001
                SellSvrUpdateU001(dbma1, userSN);

                //加入成长值表 F006
                string F006Max33SN = C101.FC10102("F006", 7, "UD");
                F006   f006        = new F006();
                f006.groupUpSN              = F006Max33SN;
                f006.userSN                 = userSN;
                f006.businessSN             = userSN;
                f006.businessType           = "出售申请";
                f006.transactionMoneyAmount = Convert.ToDecimal(a027.openServerCost);
                f006.groupUpValue           = a027.openServerCost;
                f006.acquireDate            = DateTime.Now;
                dbma1.F006s.InsertOnSubmit(f006);


                dbma1.SubmitChanges();

                return("1");
            }
        }