Пример #1
0
    public void ZerarImagem()
    {
        S01.SetActive(false);
        S02.SetActive(false);
        S03.SetActive(false);
        S04.SetActive(false);
        S05.SetActive(false);
        S06.SetActive(false);
        S07.SetActive(false);
        S08.SetActive(false);

        D01.SetActive(false);
        D02.SetActive(false);
        D03.SetActive(false);
        D04.SetActive(false);
        D05.SetActive(false);
        D06.SetActive(false);
        D07.SetActive(false);
        D08.SetActive(false);

        M01.SetActive(false);
        M02.SetActive(false);
        M03.SetActive(false);
        M04.SetActive(false);
        M05.SetActive(false);
        M06.SetActive(false);
        M07.SetActive(false);
        M08.SetActive(false);
    }
Пример #2
0
    public void testarImagem()
    {
        if (idQuestão == "172")
        {
            S01.SetActive(true);

            S02.SetActive(false);
            S03.SetActive(false);
            S04.SetActive(false);
            S05.SetActive(false);
            S06.SetActive(false);
            S07.SetActive(false);
            S08.SetActive(false);
        }
        if (idQuestão == "170")
        {
            S02.SetActive(true);

            S01.SetActive(false);
            S03.SetActive(false);
            S04.SetActive(false);
            S05.SetActive(false);
            S06.SetActive(false);
            S07.SetActive(false);
            S08.SetActive(false);
        }
        if (idQuestão == "171")
        {
            S03.SetActive(true);

            S01.SetActive(false);
            S02.SetActive(false);
            S04.SetActive(false);
            S05.SetActive(false);
            S06.SetActive(false);
            S07.SetActive(false);
            S08.SetActive(false);
        }
        if (idQuestão == "169")
        {
            S04.SetActive(true);

            S01.SetActive(false);
            S02.SetActive(false);
            S03.SetActive(false);
            S05.SetActive(false);
            S06.SetActive(false);
            S07.SetActive(false);
            S08.SetActive(false);
        }
        if (idQuestão == "168")
        {
            S05.SetActive(true);

            S01.SetActive(false);
            S02.SetActive(false);
            S03.SetActive(false);
            S04.SetActive(false);
            S06.SetActive(false);
            S07.SetActive(false);
            S08.SetActive(false);
        }
        if (idQuestão == "167")
        {
            S06.SetActive(true);

            S01.SetActive(false);
            S02.SetActive(false);
            S03.SetActive(false);
            S04.SetActive(false);
            S05.SetActive(false);
            S07.SetActive(false);
            S08.SetActive(false);
        }
        if (idQuestão == "166")
        {
            S07.SetActive(true);

            S01.SetActive(false);
            S02.SetActive(false);
            S03.SetActive(false);
            S04.SetActive(false);
            S05.SetActive(false);
            S06.SetActive(false);
            S08.SetActive(false);
        }
        if (idQuestão == "165")
        {
            S08.SetActive(true);

            S01.SetActive(false);
            S02.SetActive(false);
            S03.SetActive(false);
            S04.SetActive(false);
            S05.SetActive(false);
            S06.SetActive(false);
            S07.SetActive(false);
        }

        if (idQuestão == "173")
        {
            D01.SetActive(true);

            D02.SetActive(false);
            D03.SetActive(false);
            D04.SetActive(false);
            D05.SetActive(false);
            D06.SetActive(false);
            D07.SetActive(false);
            D08.SetActive(false);
        }
        if (idQuestão == "174")
        {
            D02.SetActive(true);

            D01.SetActive(false);
            D03.SetActive(false);
            D04.SetActive(false);
            D05.SetActive(false);
            D06.SetActive(false);
            D07.SetActive(false);
            D08.SetActive(false);
        }
        if (idQuestão == "175")
        {
            D03.SetActive(true);

            D01.SetActive(false);
            D02.SetActive(false);
            D04.SetActive(false);
            D05.SetActive(false);
            D06.SetActive(false);
            D07.SetActive(false);
            D08.SetActive(false);
        }
        if (idQuestão == "176")
        {
            D04.SetActive(true);

            D01.SetActive(false);
            D02.SetActive(false);
            D03.SetActive(false);
            D05.SetActive(false);
            D06.SetActive(false);
            D07.SetActive(false);
            D08.SetActive(false);
        }
        if (idQuestão == "177")
        {
            D05.SetActive(true);

            D01.SetActive(false);
            D02.SetActive(false);
            D03.SetActive(false);
            D04.SetActive(false);
            D06.SetActive(false);
            D07.SetActive(false);
            D08.SetActive(false);
        }
        if (idQuestão == "178")
        {
            D06.SetActive(true);

            D01.SetActive(false);
            D02.SetActive(false);
            D03.SetActive(false);
            D04.SetActive(false);
            D05.SetActive(false);
            D07.SetActive(false);
            D08.SetActive(false);
        }
        if (idQuestão == "179")
        {
            D07.SetActive(true);

            D01.SetActive(false);
            D02.SetActive(false);
            D03.SetActive(false);
            D04.SetActive(false);
            D05.SetActive(false);
            D06.SetActive(false);
            D08.SetActive(false);
        }
        if (idQuestão == "180")
        {
            D08.SetActive(true);

            D01.SetActive(false);
            D02.SetActive(false);
            D03.SetActive(false);
            D04.SetActive(false);
            D05.SetActive(false);
            D06.SetActive(false);
            D07.SetActive(false);
        }

        if (idQuestão == "181")
        {
            M01.SetActive(true);

            M02.SetActive(false);
            M03.SetActive(false);
            M04.SetActive(false);
            M05.SetActive(false);
            M06.SetActive(false);
            M07.SetActive(false);
            M08.SetActive(false);
        }
        if (idQuestão == "182")
        {
            M02.SetActive(true);

            M01.SetActive(false);
            M03.SetActive(false);
            M04.SetActive(false);
            M05.SetActive(false);
            M06.SetActive(false);
            M07.SetActive(false);
            M08.SetActive(false);
        }
        if (idQuestão == "183")
        {
            M03.SetActive(true);

            M01.SetActive(false);
            M02.SetActive(false);
            M04.SetActive(false);
            M05.SetActive(false);
            M06.SetActive(false);
            M07.SetActive(false);
            M08.SetActive(false);
        }
        if (idQuestão == "184")
        {
            M04.SetActive(true);

            M01.SetActive(false);
            M02.SetActive(false);
            M03.SetActive(false);
            M05.SetActive(false);
            M06.SetActive(false);
            M07.SetActive(false);
            M08.SetActive(false);
        }
        if (idQuestão == "185")
        {
            M05.SetActive(true);

            M01.SetActive(false);
            M02.SetActive(false);
            M03.SetActive(false);
            M04.SetActive(false);
            M06.SetActive(false);
            M07.SetActive(false);
            M08.SetActive(false);
        }
        if (idQuestão == "186")
        {
            M06.SetActive(true);

            M01.SetActive(false);
            M02.SetActive(false);
            M03.SetActive(false);
            M04.SetActive(false);
            M05.SetActive(false);
            M07.SetActive(false);
            M08.SetActive(false);
        }
        if (idQuestão == "187")
        {
            M07.SetActive(true);

            M01.SetActive(false);
            M02.SetActive(false);
            M03.SetActive(false);
            M04.SetActive(false);
            M05.SetActive(false);
            M06.SetActive(false);
            M08.SetActive(false);
        }
        if (idQuestão == "188")
        {
            M08.SetActive(true);

            M01.SetActive(false);
            M02.SetActive(false);
            M03.SetActive(false);
            M04.SetActive(false);
            M05.SetActive(false);
            M06.SetActive(false);
            M07.SetActive(false);
        }
    }
Пример #3
0
        private async Task <SellMemberPointViewModel> AddMemberPoint(SaleToCustomerDetail saleToCustomerDetail)
        {
            MemberPointRule pointRule = await this.GetPointRule();

            // Left JOIN
            var customers = await(from m1 in this.AppDbContext.Members
                                  join m2 in this.AppDbContext.Members
                                  on m1.ReferenceMemberID equals m2.MemberID
                                  where m1.MemberID.Equals(saleToCustomerDetail.Sale.Customer.MemberID, StringComparison.InvariantCultureIgnoreCase)
                                  select m2 into M01
                                  join m3 in this.AppDbContext.Members
                                  on M01.ReferenceMemberID equals m3.MemberID into M02
                                  from m4 in M02.DefaultIfEmpty()
                                  select new
            {
                MemberID    = M01.MemberID,
                MemberName  = M01.Name,
                MemberLevel = M01.Level,

                Up1ID                = m4.MemberID,
                Up1Name              = m4.Name,
                Up1Level             = m4.Level,
                Up1ReferenceMemberID = m4.ReferenceMemberID
            } into M03
                                  join m5 in this.AppDbContext.Members
                                  on M03.Up1ReferenceMemberID equals m5.MemberID into M04
                                  from m6 in M04.DefaultIfEmpty()
                                  select new SellMemberPointViewModel
            {
                MemberID    = M03.MemberID,
                MemberName  = M03.MemberName,
                MemberLevel = M03.MemberLevel,

                Up1ID    = M03.Up1ID,
                Up1Name  = M03.Up1Name,
                Up1Level = M03.Up1Level,

                Up2ID    = m6.MemberID,
                Up2Name  = m6.Name,
                Up2Level = m6.Level,
            }).FirstOrDefaultAsync();


            //var customers = GetCustomersFromSqlCommand(AppDbContext.Database.Connection,
            //      saleToCustomerDetail.Sale.Customer.MemberID);


            if (customers == null)
            {
                return(new SellMemberPointViewModel
                {
                    MemberID = "",
                    MemberName = "",
                    MemberLevel = "",

                    Up1ID = "",
                    Up1Name = "",
                    Up1Level = "",

                    Up2ID = "",
                    Up2Name = "",
                    Up2Level = ""
                });
            }

            customers.PointCount = await AddOneMemberPoint(saleToCustomerDetail, pointRule,
                                                           customers.MemberID, customers.MemberLevel, LevelRelation.Self);

            customers.Up1PointCount = await AddOneMemberPoint(saleToCustomerDetail, pointRule,
                                                              customers.Up1ID, customers.Up1Level, LevelRelation.Son);

            customers.Up2PointCount = await AddOneMemberPoint(saleToCustomerDetail, pointRule,
                                                              customers.Up2ID, customers.Up2Level, LevelRelation.Grandson);

            return(customers);
        }