Example #1
0
        private void FX3(int gid, int oid, string[] fromShareUserIds, decimal profit1, decimal profit2, decimal profit3)
        {
            string shareId = string.Empty;
            pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();

            ResultInfo <bool> resultIsExistByFromShareOrderId1 = pbsBasicMyShareProfitService.IsExistByFromShareOrderIdAndShareLevel(Utility.Util.ParseHelper.ToInt(Utility.Util.ParseHelper.ToInt(fromShareUserIds[0])), 3);

            if (resultIsExistByFromShareOrderId1.Result && !resultIsExistByFromShareOrderId1.Data)
            {
                //三级级分销
                ResultInfo <bool> resultAddMyShareProfit1 = pbsBasicMyShareProfitService.AddMyShareProfit(
                    Utility.Util.ParseHelper.ToInt(gid), 3, profit3, Utility.Util.ParseHelper.ToInt(fromShareUserIds[0]),
                    0, oid, DateTime.Now, DateTime.Now, 0, string.Empty, ref shareId);
            }

            ResultInfo <bool> resultIsExistByFromShareOrderId2 = pbsBasicMyShareProfitService.IsExistByFromShareOrderIdAndShareLevel(Utility.Util.ParseHelper.ToInt(Utility.Util.ParseHelper.ToInt(fromShareUserIds[0])), 2);

            if (resultIsExistByFromShareOrderId2.Result && !resultIsExistByFromShareOrderId2.Data)
            {
                //二级级分销
                ResultInfo <bool> resultAddMyShareProfit2 = pbsBasicMyShareProfitService.AddMyShareProfit(
                    Utility.Util.ParseHelper.ToInt(gid), 2, profit2, Utility.Util.ParseHelper.ToInt(fromShareUserIds[1]),
                    0, oid, DateTime.Now, DateTime.Now, 0, string.Empty, ref shareId);
            }

            ResultInfo <bool> resultIsExistByFromShareOrderId3 = pbsBasicMyShareProfitService.IsExistByFromShareOrderIdAndShareLevel(Utility.Util.ParseHelper.ToInt(Utility.Util.ParseHelper.ToInt(fromShareUserIds[1])), 1);

            if (resultIsExistByFromShareOrderId3.Result && !resultIsExistByFromShareOrderId3.Data)
            {
                //一级分销
                ResultInfo <bool> resultAddMyShareProfit3 = pbsBasicMyShareProfitService.AddMyShareProfit(
                    Utility.Util.ParseHelper.ToInt(gid), 1, profit1, Utility.Util.ParseHelper.ToInt(fromShareUserIds[2]),
                    0, oid, DateTime.Now, DateTime.Now, 0, string.Empty, ref shareId);
            }
        }
Example #2
0
 public void TestIsExistByFromShareOrderIdAndShareLevel()
 {
     int fromShareOrderId = 50;
     int ShareLevel       = 1;
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     var result = pbsBasicMyShareProfitService.IsExistByFromShareOrderIdAndShareLevel(fromShareOrderId, ShareLevel);
 }
Example #3
0
        public ActionResult MemberShareProfitList(int userId)
        {
            List <pbs_basic_MyShareProfit> pbs_basic_MyShareProfitList  = new List <pbs_basic_MyShareProfit>();
            pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
            ResultInfo <List <pbs_basic_MyShareProfit> > result_listMyShareProfitResult = pbsBasicMyShareProfitService.GetMyShareProfitList(userId);

            if (result_listMyShareProfitResult.Result && result_listMyShareProfitResult.Data != null)
            {
                pbs_basic_MyShareProfitList = result_listMyShareProfitResult.Data;
            }
            ViewData["pbs_basic_MyShareProfitList"] = pbs_basic_MyShareProfitList;
            return(View());
        }
Example #4
0
        public ActionResult MemberShareProfitDetailList()
        {
            List <pbs_basic_ShareDetail>               list = new List <pbs_basic_ShareDetail>();
            pbs_basic_MyShareProfitService             pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
            ResultInfo <List <pbs_basic_ShareDetail> > result_list = pbsBasicMyShareProfitService.GetShareDetailList();

            if (result_list.Result && result_list.Data != null)
            {
                list = result_list.Data;
            }
            ViewData["List"] = list;
            return(View());
        }
Example #5
0
 public void TestUpdateMyShareProfit()
 {
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     int      goodsId             = 111;
     int      shareLevel          = 1;
     decimal  profit              = 0;
     int      userId              = 2;
     int      fromShareOrderId    = 222;
     int      currentShareOrderId = 333;
     DateTime createTime          = DateTime.Now;
     DateTime updateTime          = DateTime.Now;
     int      creatorId           = 0;
     string   remark              = string.Empty;
     int      shareId             = 1;
     var      result              = pbsBasicMyShareProfitService.UpdateMyShareProfit(goodsId, shareLevel, profit, userId, fromShareOrderId, currentShareOrderId, createTime, updateTime, creatorId, remark, shareId);
 }
Example #6
0
        public ActionResult MyShareProfit()
        {
            decimal myShareProfit = 0m;
            List <pbs_basic_MyShareProfit> pbs_basic_MyShareProfitList  = new List <pbs_basic_MyShareProfit>();
            pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
            ResultInfo <List <pbs_basic_MyShareProfit> > result_listMyShareProfitResult = pbsBasicMyShareProfitService.GetMyShareProfitList(userid);

            if (result_listMyShareProfitResult.Result && result_listMyShareProfitResult.Data != null)
            {
                pbs_basic_MyShareProfitList = result_listMyShareProfitResult.Data;
            }

            ResultInfo <decimal> result_GetMyShareProfitByUserId = pbsBasicMyShareProfitService.GetMyShareProfitByUserId(userid);

            if (result_GetMyShareProfitByUserId.Result && result_GetMyShareProfitByUserId.Data != 0)
            {
                myShareProfit = result_GetMyShareProfitByUserId.Data;
            }

            ViewData["MyShareProfit"] = myShareProfit;
            ViewData["pbs_basic_MyShareProfitList"] = pbs_basic_MyShareProfitList;

            return(View(pbs_basic_MyShareProfitList));
        }
Example #7
0
 public void TestGetMyShareProfitByUserId()
 {
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     int userId = 7;
     var result = pbsBasicMyShareProfitService.GetMyShareProfitByUserId(userId);
 }
Example #8
0
 public void TestGetMyShareProfitModelByFromShareOrderId()
 {
     int fromShareOrderId = 222;
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     var result = pbsBasicMyShareProfitService.GetMyShareProfitModelByFromShareOrderId(fromShareOrderId);
 }
Example #9
0
 public void TestIsExistByFromShareOrderId()
 {
     int fromShareOrderId = 50;
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     var result = pbsBasicMyShareProfitService.IsExistByFromShareOrderId(fromShareOrderId);
 }
Example #10
0
 public void TestIsExistByShareId()
 {
     int shareId = 1;
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     var result = pbsBasicMyShareProfitService.IsExistByShareId(shareId);
 }
Example #11
0
 public void TestGetMyShareProfitList()
 {
     int userId = 2;
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     var result = pbsBasicMyShareProfitService.GetMyShareProfitList(userId);
 }
Example #12
0
 public void TestGetMyShareProfitModelById()
 {
     int shareId = 1;
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     var result = pbsBasicMyShareProfitService.GetMyShareProfitModelById(shareId);
 }