protected void SetReturn()
 {
     //生成ID并访问图片页
     SetPic(AppConfig.PPLiveUrl() + "PPLive/AstroChart.aspx?ID=" + AstroBiz.GetInstance().SetGraphicID(m_astro));
     //    + "&fa=" + m_astro.composeFile1.Replace(AppDomain.CurrentDomain.BaseDirectory + AppConfig.AstroGraphicPath() + @"Tmp\", "")
     //    + "&fb=" + m_astro.composeFile2.Replace(AppDomain.CurrentDomain.BaseDirectory + AppConfig.AstroGraphicPath() + @"Tmp\", ""));
 }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["ID"] != null && Request.QueryString["ID"] != "")
     {
         try
         {
             //生成图片
             AstroMod mod = new AstroMod();
             mod.graphicID = Request.QueryString["ID"];
             if (Request.QueryString["fa"] != "")
             {
                 mod.composeFile1 = AppDomain.CurrentDomain.BaseDirectory + AppConfig.AstroGraphicPath() + @"Tmp\" + Request.QueryString["fa"];
             }
             if (Request.QueryString["fb"] != "")
             {
                 mod.composeFile2 = AppDomain.CurrentDomain.BaseDirectory + AppConfig.AstroGraphicPath() + @"Tmp\" + Request.QueryString["fb"];
             }
             AstroBiz.GetInstance().GetGraphic(mod);
             //输出
             CreateImageOnPage(AstroBiz.GetInstance().GetGraphicPath(mod.graphicID), HttpContext.Current);
         }
         catch (Exception ex)
         {
             LogManagement.getInstance().WriteException(ex, "星盘显示", Request.UserHostAddress);
         }
     }
 }
示例#3
0
        public void SetSameFamous()
        {
            DataSet m_ds = AstroBiz.GetInstance().GetSameFamous(m_astro);

            if (m_ds != null && m_ds.Tables.Count == 15)
            {
                SortedList m_star  = PublicValue.GetAstroStar();
                DataTable  m_stars = new DataTable();
                m_stars.Columns.Add("starname");
                m_stars.Columns.Add("gong");
                for (int i = 0; i < 10; i++)
                {
                    DataRow m_dr = m_stars.NewRow();
                    m_dr["starname"] = m_star[i + 1];
                    m_dr["gong"]     = m_astro.Stars[i].Gong;
                    m_stars.Rows.Add(m_dr);
                }



                for (int i = 5; m_star.Count > 5;)
                {
                    m_star.RemoveAt(i);
                }

                ViewState["samefamous"] = m_ds;
                Repeater1.DataSource    = m_star;
                Repeater1.DataBind();

                Repeater3.DataSource = m_stars;
                Repeater3.DataBind();
            }
        }
示例#4
0
        public ReturnValue <AstroMod> TimeToAstro()
        {
            AstroMod input = null;

            if (input == null)
            {
                input             = new AstroMod();
                input.birth       = DateTime.Now;
                input.position    = new LatLng(SYS_DistrictBll.GetInstance().GetModel(37));
                input.IsDayLight  = AppEnum.BOOL.False;
                input.zone        = -8;
                input.birth1      = DateTime.Now.AddDays(-300);
                input.position1   = new LatLng(SYS_DistrictBll.GetInstance().GetModel(37));
                input.IsDayLight1 = AppEnum.BOOL.False;
                input.zone1       = -8;
                input.type        = PublicValue.AstroType.hepan;
                input.compose     = PublicValue.AstroZuhe.bijiao;
                input.startsShow.Clear();
                for (int i = 1; i <= 30; i++)
                {
                    input.startsShow.Add(i, PublicValue.GetAstroStar((PublicValue.AstroStar)i));
                }
                input.aspectsShow.Clear();
                input.aspectsShow.Add(1, 0);
                input.aspectsShow.Add(2, 180);
                input.aspectsShow.Add(4, 120);
                input.aspectsShow.Add(3, 90);
                input.aspectsShow.Add(5, 60);
            }

            //input.graphicID = AstroBiz.GetInstance().SetGraphicID(input);
            AstroBiz.GetInstance().GetParamters(ref input);
            if ((input.type == PublicValue.AstroType.hepan && input.compose == PublicValue.AstroZuhe.bijiao) || (input.type == PublicValue.AstroType.tuiyun && input.transit == PublicValue.AstroTuiyun.xingyun))
            {
                AstroMod tmpinput = new AstroMod();
                tmpinput.aspectsShow = input.aspectsShow;
                tmpinput.startsShow  = input.startsShow;
                tmpinput.birth       = input.birth;
                tmpinput.position    = input.position;
                tmpinput.IsDayLight  = input.IsDayLight;
                tmpinput.zone        = input.zone;
                AstroBiz.GetInstance().GetParamters(ref tmpinput);
                input.Stars1 = tmpinput.Stars;
            }
            else
            {
                input.Stars1 = null;
            }
            return(ReturnValue <AstroMod> .Get200OK(input));
        }
示例#5
0
        // Methods
        protected void Button1_Click(object sender, EventArgs e)
        {
            AstroMod mod = new AstroMod
            {
                type       = PublicValue.AstroType.benming,
                birth      = new DateTime(int.Parse(this.hfYear.Value), int.Parse(this.hfMonth.Value), int.Parse(this.hfDay.Value), int.Parse(this.hfHour.Value), 0, 0),
                position   = new LatLng(SYS_DistrictBll.GetInstance().GetModel(0x856)),
                IsDayLight = AppEnum.BOOL.False,
                zone       = -8
            };

            for (int i = 1; i < 0x15; i++)
            {
                mod.startsShow.Add(i, "");
            }
            mod.aspectsShow.Clear();
            for (int j = 1; j < 6; j++)
            {
                mod.aspectsShow.Add(j, 5M);
            }
            AstroBiz.GetInstance().GetParamters(ref mod);
            VenusLoveMod model = new VenusLoveMod
            {
                BirthTime = mod.birth,
                Source    = 1,
                TS        = DateTime.Now,
                UserSysNo = QQWeiBoUserBll.GetInstance().GetRecordByName(this.wb_name).SysNo
            };

            VenusLoveBll.GetInstance().Add(model);
            int constellation = 0;

            foreach (Star star in mod.Stars)
            {
                if (star.StarName == PublicValue.AstroStar.Ven)
                {
                    constellation = (int)star.Constellation;
                    break;
                }
            }
            if (constellation != 0)
            {
                this.ltrTitle.Text   = this.titles[constellation - 1];
                this.ltrContext.Text = this.contexts[constellation - 1];
            }
            this.MultiView1.ActiveViewIndex = 1;
            this.ViewState["ele"]           = constellation;
        }
示例#6
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            DateTime now = DatePicker1.SelectedTime;
            Dictionary <string, SortedDictionary <int, int> > result = new Dictionary <string, SortedDictionary <int, int> >();
            int count = 0;

            for (DateTime tmpnow = now; tmpnow < now.AddYears(1); tmpnow = tmpnow.AddHours(1))
            {
                #region 计算
                AstroMod m_astro = new AstroMod();
                m_astro.type = PublicValue.AstroType.benming;
                #region 设置实体各种参数
                m_astro.birth    = tmpnow;
                m_astro.position = new LatLng(SYS_DistrictBll.GetInstance().GetModel(1));
                //if (chkDaylight1.Checked)
                //{
                //    m_astro.IsDayLight = AppEnum.BOOL.True;
                //}
                //else
                //{
                //    m_astro.IsDayLight = AppEnum.BOOL.False;
                //}
                m_astro.IsDayLight = AppEnum.BOOL.False;
                m_astro.zone       = -8;

                for (int i = 1; i < 21; i++)
                {
                    m_astro.startsShow.Add(i, "");
                }
                m_astro.aspectsShow.Clear();
                for (int i = 1; i < 6; i++)
                {
                    m_astro.aspectsShow.Add(i, 5);
                }
                #endregion

                AstroBiz.GetInstance().GetParamters(ref m_astro);
                Dictionary <PublicValue.AstroStar, Star> m_star = new Dictionary <PublicValue.AstroStar, Star>();
                foreach (Star tmpstar in m_astro.Stars)
                {
                    m_star.Add(tmpstar.StarName, tmpstar);
                }
                string jsstr = "";
                //吉星
                List <PublicValue.AstroStar> goodstars = new List <PublicValue.AstroStar>();
                goodstars.Add(PublicValue.AstroStar.Jup);
                goodstars.Add(PublicValue.AstroStar.Ven);
                //凶星
                Dictionary <PublicValue.AstroStar, int> badstars = new Dictionary <PublicValue.AstroStar, int>();
                List <PublicValue.AstroStar>            tmpbad   = new List <PublicValue.AstroStar>();
                tmpbad.Add(PublicValue.AstroStar.Mar);
                tmpbad.Add(PublicValue.AstroStar.Sat);
                tmpbad.Add(PublicValue.AstroStar.Ura);
                tmpbad.Add(PublicValue.AstroStar.Nep);
                tmpbad.Add(PublicValue.AstroStar.Plu);
                List <PublicValue.AstroStar> twelve = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 12, false);
                List <PublicValue.AstroStar> eight  = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 8, false);
                List <PublicValue.AstroStar> seven  = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 7, false);
                List <PublicValue.AstroStar> two    = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 2, false);
                foreach (PublicValue.AstroStar tmp in tmpbad)
                {
                    badstars.Add(tmp, 1);
                }
                foreach (PublicValue.AstroStar tmp in eight)
                {
                    if (!tmpbad.Contains(tmp))
                    {
                        if (!badstars.ContainsKey(tmp))
                        {
                            badstars.Add(tmp, 1);
                        }
                    }
                    else
                    {
                        badstars[tmp]++;
                    }
                }
                foreach (PublicValue.AstroStar tmp in twelve)
                {
                    if (!tmpbad.Contains(tmp))
                    {
                        if (!badstars.ContainsKey(tmp))
                        {
                            badstars.Add(tmp, 1);
                        }
                    }
                    else
                    {
                        badstars[tmp]++;
                    }
                }
                List <PublicValue.AstroStar> mingzhu = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 1, false);
                foreach (PublicValue.AstroStar tmp in mingzhu)
                {
                    if (!tmpbad.Contains(tmp))
                    {
                        if (!badstars.ContainsKey(tmp))
                        {
                            badstars.Add(tmp, 1);
                        }
                    }
                    else
                    {
                        badstars[tmp]++;
                    }
                }


                #region 红杏
                bool hongxing = false;
                if (PublicDeal.GetInstance().HasPhase(m_star[PublicValue.AstroStar.Ven], m_star[PublicValue.AstroStar.Jun], PublicValue.Phase.he, AppConst.DecimalNull) ||
                    PublicDeal.GetInstance().HasPhase(m_star[PublicValue.AstroStar.Ven], m_star[PublicValue.AstroStar.Jun], PublicValue.Phase.chong, AppConst.DecimalNull) ||
                    PublicDeal.GetInstance().HasPhase(m_star[PublicValue.AstroStar.Ven], m_star[PublicValue.AstroStar.Jun], PublicValue.Phase.xing, AppConst.DecimalNull))
                {
                    hongxing = true;
                }
                if (!result.ContainsKey("红杏"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    tmpdic.Add(0, 0);
                    tmpdic.Add(1, 0);
                    result.Add("红杏", tmpdic);
                }
                if (!hongxing)
                {
                    result["红杏"][0]++;
                }
                else
                {
                    result["红杏"][1]++;
                }
                #endregion

                #region 蜜蜂
                int beecount = 0;
                List <PublicValue.AstroStar> beestars = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 7, false);

                beestars.Add(PublicValue.AstroStar.Des);
                beestars.Add(PublicValue.AstroStar.Jun);
                foreach (PublicValue.AstroStar tmpstar in beestars)
                {
                    int tmpflag = 0;
                    if (tmpstar != goodstars[0] && PublicDeal.GetInstance().HasAnyMainPhase(m_star[tmpstar], m_star[goodstars[0]]))
                    {
                        beecount++;
                        tmpflag = 1;
                    }
                    if (tmpstar != goodstars[1] && PublicDeal.GetInstance().HasAnyMainPhase(m_star[tmpstar], m_star[goodstars[1]]))
                    {
                        beecount++;
                        if (tmpflag == 1)
                        {
                            beecount++;
                        }
                    }
                }

                if (!result.ContainsKey("蜜蜂"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("蜜蜂", tmpdic);
                }
                if (!result["蜜蜂"].ContainsKey(beecount))
                {
                    result["蜜蜂"].Add(beecount, 0);
                }
                result["蜜蜂"][beecount]++;
                #endregion

                #region 花盆

                #endregion

                #region 负面
                Dictionary <string, int> showele = new Dictionary <string, int>();
                showele.Add("paopao", 0);
                showele.Add("chongzi", 0);
                showele.Add("cu", 0);
                showele.Add("liehen", 0);
                showele.Add("bingdong", 0);
                showele.Add("zhezhi", 0);
                showele.Add("kuye", 0);

                List <PublicValue.AstroStar> breakstars = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 7, false);
                breakstars.Add(PublicValue.AstroStar.Ven);
                breakstars.Add(PublicValue.AstroStar.Jun);
                breakstars.Add(PublicValue.AstroStar.Des);
                breakstars = breakstars.Distinct().ToList();
                foreach (PublicValue.AstroStar tmp in badstars.Keys)
                {
                    //if (tmp != goodstars[0])
                    //    continue;
                    int tmpflag = 0;
                    for (int i = 0; i < breakstars.Count; i++)
                    {
                        if (PublicDeal.GetInstance().HasAnyBadPhase(m_star[tmp], m_star[breakstars[i]]))
                        {
                            bool Exact = false;
                            if (PublicDeal.GetInstance().HasAnyBadPhase(m_star[tmp], m_star[breakstars[i]], 1))
                            {
                                Exact = true;
                            }
                            switch (tmp)
                            {
                            case PublicValue.AstroStar.Mar:
                            case PublicValue.AstroStar.Sun:
                                showele["zhezhi"] += badstars[tmp];
                                if (Exact)
                                {
                                    showele["zhezhi"]++;
                                }
                                break;

                            case PublicValue.AstroStar.Jup:
                            case PublicValue.AstroStar.Ven:
                                showele["kuye"] += badstars[tmp];
                                if (Exact)
                                {
                                    showele["kuye"]++;
                                }
                                break;

                            case PublicValue.AstroStar.Sat:
                                showele["liehen"] += badstars[tmp];
                                if (Exact)
                                {
                                    showele["liehen"]++;
                                }
                                break;

                            case PublicValue.AstroStar.Ura:
                                showele["bingdong"] += badstars[tmp];
                                if (Exact)
                                {
                                    showele["bingdong"]++;
                                }
                                break;

                            case PublicValue.AstroStar.Nep:
                                showele["paopao"] += badstars[tmp];
                                if (Exact)
                                {
                                    showele["paopao"]++;
                                }
                                break;

                            case PublicValue.AstroStar.Plu:
                            case PublicValue.AstroStar.Moo:
                                showele["cu"] += badstars[tmp];
                                if (Exact)
                                {
                                    showele["cu"]++;
                                }
                                break;

                            case PublicValue.AstroStar.Mer:
                                showele["chongzi"] += badstars[tmp];
                                if (Exact)
                                {
                                    showele["chongzi"]++;
                                }
                                break;
                            }
                            tmpflag++;
                            if (tmpflag > 1)
                            {
                                switch (tmp)
                                {
                                case PublicValue.AstroStar.Mar:
                                case PublicValue.AstroStar.Sun:
                                    showele["zhezhi"]++;
                                    break;

                                case PublicValue.AstroStar.Jup:
                                case PublicValue.AstroStar.Ven:
                                    showele["kuye"]++;
                                    break;

                                case PublicValue.AstroStar.Sat:
                                    showele["liehen"]++;
                                    break;

                                case PublicValue.AstroStar.Ura:
                                    showele["bingdong"]++;
                                    break;

                                case PublicValue.AstroStar.Nep:
                                    showele["paopao"]++;
                                    break;

                                case PublicValue.AstroStar.Plu:
                                case PublicValue.AstroStar.Moo:
                                    showele["cu"]++;
                                    break;

                                case PublicValue.AstroStar.Mer:
                                    showele["chongzi"]++;
                                    break;
                                }
                            }
                        }
                    }
                }
                if (!result.ContainsKey("泡泡"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("泡泡", tmpdic);
                }
                if (!result["泡泡"].ContainsKey(showele["paopao"]))
                {
                    result["泡泡"].Add(showele["paopao"], 0);
                }
                result["泡泡"][showele["paopao"]]++;

                if (!result.ContainsKey("虫子"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("虫子", tmpdic);
                }
                if (!result["虫子"].ContainsKey(showele["chongzi"]))
                {
                    result["虫子"].Add(showele["chongzi"], 0);
                }
                result["虫子"][showele["chongzi"]]++;

                if (!result.ContainsKey("醋"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("醋", tmpdic);
                }
                if (!result["醋"].ContainsKey(showele["cu"]))
                {
                    result["醋"].Add(showele["cu"], 0);
                }
                result["醋"][showele["cu"]]++;

                if (!result.ContainsKey("裂痕"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("裂痕", tmpdic);
                }
                if (!result["裂痕"].ContainsKey(showele["liehen"]))
                {
                    result["裂痕"].Add(showele["liehen"], 0);
                }
                result["裂痕"][showele["liehen"]]++;

                if (!result.ContainsKey("冰冻"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("冰冻", tmpdic);
                }
                if (!result["冰冻"].ContainsKey(showele["bingdong"]))
                {
                    result["冰冻"].Add(showele["bingdong"], 0);
                }
                result["冰冻"][showele["bingdong"]]++;

                if (!result.ContainsKey("折枝"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("折枝", tmpdic);
                }
                if (!result["折枝"].ContainsKey(showele["zhezhi"]))
                {
                    result["折枝"].Add(showele["zhezhi"], 0);
                }
                result["折枝"][showele["zhezhi"]]++;

                if (!result.ContainsKey("枯叶"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("枯叶", tmpdic);
                }
                if (!result["枯叶"].ContainsKey(showele["kuye"]))
                {
                    result["枯叶"].Add(showele["kuye"], 0);
                }
                result["枯叶"][showele["kuye"]]++;

                if (!result.ContainsKey("总负面"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("总负面", tmpdic);
                }
                int tmpbadd = showele["paopao"] + showele["chongzi"] + showele["cu"] + showele["liehen"] + showele["bingdong"] + showele["zhezhi"] + showele["kuye"];
                if (!result["总负面"].ContainsKey(tmpbadd))
                {
                    result["总负面"].Add(tmpbadd, 0);
                }
                result["总负面"][tmpbadd]++;


                #endregion

                #region 花心指数
                int flowercount = 0;
                foreach (PublicValue.AstroStar tmpstar in goodstars)
                {
                    if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]))
                    {
                        flowercount++;
                    }
                    if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Chi], m_star[tmpstar]))
                    {
                        flowercount++;
                    }
                    foreach (PublicValue.AstroStar tmpstarr in eight)
                    {
                        if (tmpstar != tmpstarr && PublicDeal.GetInstance().HasAnyMainPhase(m_star[tmpstarr], m_star[tmpstar]))
                        {
                            flowercount++;
                        }
                    }
                }
                if (m_star[PublicValue.AstroStar.Moo].Constellation == PublicValue.Constellation.Gem ||
                    m_star[PublicValue.AstroStar.Moo].Constellation == PublicValue.Constellation.Sag ||
                    m_star[PublicValue.AstroStar.Moo].Constellation == PublicValue.Constellation.Pis)
                {
                    flowercount++;
                }
                if (m_star[PublicValue.AstroStar.Ven].Constellation == PublicValue.Constellation.Gem ||
                    m_star[PublicValue.AstroStar.Ven].Constellation == PublicValue.Constellation.Sag ||
                    m_star[PublicValue.AstroStar.Ven].Constellation == PublicValue.Constellation.Pis)
                {
                    flowercount++;
                }
                if (m_star[PublicValue.AstroStar.Des].Constellation == PublicValue.Constellation.Gem ||
                    m_star[PublicValue.AstroStar.Des].Constellation == PublicValue.Constellation.Sag ||
                    m_star[PublicValue.AstroStar.Des].Constellation == PublicValue.Constellation.Pis)
                {
                    flowercount++;
                }
                if (m_star[PublicValue.AstroStar.Moo].Gong == 12)
                {
                    flowercount++;
                }
                if (m_star[PublicValue.AstroStar.Ven].Gong == 12)
                {
                    flowercount++;
                }
                if (PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Sun].Constellation) == PublicValue.Element.wind && PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Moo].Constellation) == PublicValue.Element.earth)
                {
                    flowercount++;
                }
                if (PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Sun].Constellation) == PublicValue.Element.fire && PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Moo].Constellation) == PublicValue.Element.wind)
                {
                    flowercount++;
                }
                if (m_astro.Gender == AppEnum.Gender.male)
                {
                    flowercount++;
                }
                if (!result.ContainsKey("花心"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("花心", tmpdic);
                }
                if (!result["花心"].ContainsKey(flowercount))
                {
                    result["花心"].Add(flowercount, 0);
                }
                result["花心"][flowercount]++;
                #endregion

                #region 魅力指数
                int meilicount = beecount;
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Ura], m_star[PublicValue.AstroStar.For]))
                {
                    meilicount++;
                }
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Ura], m_star[PublicValue.AstroStar.Ven]))
                {
                    meilicount++;
                }
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[PublicValue.AstroStar.Ven]))
                {
                    meilicount++;
                }
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Sun], m_star[PublicValue.AstroStar.Jup]))
                {
                    meilicount++;
                }

                if (!result.ContainsKey("魅力"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("魅力", tmpdic);
                }
                if (!result["魅力"].ContainsKey(meilicount))
                {
                    result["魅力"].Add(meilicount, 0);
                }
                result["魅力"][meilicount]++;
                #endregion

                #region 对方有钱
                int richcount = PublicDeal.GetInstance().GetGongPower(m_astro.Stars, 8);
                if (richcount > 15)
                {
                    richcount = 15;
                }
                foreach (PublicValue.AstroStar tmpstar in seven)
                {
                    if (m_star[tmpstar].Gong == 8 || m_star[tmpstar].Gong == 7)
                    {
                        richcount = richcount + 5;
                    }
                }
                foreach (PublicValue.AstroStar tmpstar in eight)
                {
                    if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[tmpstar]))
                    {
                        richcount = richcount + 5;
                    }
                    if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[PublicValue.AstroStar.For]))
                    {
                        richcount = richcount + 5;
                    }
                    if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[PublicValue.AstroStar.For]))
                    {
                        richcount = richcount + 5;
                    }
                }
                foreach (PublicValue.AstroStar tmpstar in two)
                {
                    if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[tmpstar]))
                    {
                        richcount = richcount + 5;
                    }
                    if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[PublicValue.AstroStar.For]))
                    {
                        richcount = richcount + 5;
                    }
                    if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[PublicValue.AstroStar.For]))
                    {
                        richcount = richcount + 5;
                    }
                }
                if (m_star[PublicValue.AstroStar.Jun].Gong == 11)
                {
                    richcount = richcount + 5;
                }
                if (m_star[PublicValue.AstroStar.Ura].Gong == 8)
                {
                    richcount = richcount + 5;
                }
                if (richcount >= 60)
                {
                    Label1.Text += m_astro.birth.ToString("yyyy-MM-dd HH:mm:ss") + "<br />";
                    //return;
                }

                List <List <PublicValue.AstroStar> > hurong = PublicDeal.GetInstance().GetHuRong(m_astro.Stars, true);;
                if (!result.ContainsKey("对方有钱"))
                {
                    SortedDictionary <int, int> tmpdic = new SortedDictionary <int, int>();
                    result.Add("对方有钱", tmpdic);
                }
                if (!result["对方有钱"].ContainsKey(richcount))
                {
                    result["对方有钱"].Add(richcount, 0);
                }
                result["对方有钱"][richcount]++;
                #endregion
                #endregion
                count++;
            }
            #region 打印
            Label1.Text += now.ToString("yyyy-MM-dd") + "至" + DatePicker1.SelectedTime.ToString("yyyy-MM-dd") + "<br />";
            foreach (KeyValuePair <string, SortedDictionary <int, int> > s in result)
            {
                Label1.Text += s.Key + ":<br />";
                foreach (KeyValuePair <int, int> ss in s.Value)
                {
                    Label1.Text += ss.Key + ":" + ss.Value + "个<br />";
                }
            }
            #endregion
        }
示例#7
0
        protected void Unnamed10_Click(object sender, EventArgs e)
        {
            AstroMod m_astro = new AstroMod();

            #region 设置实体各种参数
            m_astro.birth = new DateTime(int.Parse(drpYear.SelectedValue), int.Parse(drpMonth.SelectedValue), int.Parse(drpDay.SelectedValue),
                                         int.Parse(drpHour.SelectedValue), int.Parse(drpMinute.SelectedValue), 0);
            m_astro.position = new LatLng(SYS_DistrictBll.GetInstance().GetModel(int.Parse(drpDistrict3.SelectedValue)));
            if (chkDaylight.Checked)
            {
                m_astro.IsDaylight = AppEnum.BOOL.True;
            }
            else
            {
                m_astro.IsDaylight = AppEnum.BOOL.False;
            }
            m_astro.houseSystem = int.Parse(drpSOH.SelectedValue);
            m_astro.startsShow.Clear();
            for (int i = 0; i < chkStar.Items.Count; i++)
            {
                if (chkStar.Items[i].Selected)
                {
                    m_astro.startsShow.Add(int.Parse(chkStar.Items[i].Value), chkStar.Items[i].Text);
                }
            }
            try
            {
                m_astro.aspectsShow.Clear();
                if (chkAspect1.Checked)
                {
                    m_astro.aspectsShow.Add(1, decimal.Parse(txtAspect1.Text));
                }
                else
                {
                    m_astro.aspectsShow.Add(1, -1);
                }
                if (chkAspect2.Checked)
                {
                    m_astro.aspectsShow.Add(2, decimal.Parse(txtAspect2.Text));
                }
                else
                {
                    m_astro.aspectsShow.Add(2, -1);
                }
                if (chkAspect3.Checked)
                {
                    m_astro.aspectsShow.Add(4, decimal.Parse(txtAspect3.Text));
                }
                else
                {
                    m_astro.aspectsShow.Add(4, -1);
                }
                if (chkAspect4.Checked)
                {
                    m_astro.aspectsShow.Add(3, decimal.Parse(txtAspect4.Text));
                }
                else
                {
                    m_astro.aspectsShow.Add(3, -1);
                }
                if (chkAspect5.Checked)
                {
                    m_astro.aspectsShow.Add(5, decimal.Parse(txtAspect5.Text));
                }
                else
                {
                    m_astro.aspectsShow.Add(5, -1);
                }
            }
            catch
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('输入容许度格式有误');", true);
            }
            #endregion
            //生成ID并访问图片页
            Image1.ImageUrl = "AstroChart.aspx?ID=" + AstroBiz.GetInstance().SetGraphicID(m_astro)
                              + "&fa=" + m_astro.composeFile1.Replace(AppDomain.CurrentDomain.BaseDirectory + AppConfig.AstroGraphicPath() + @"Tmp\", "")
                              + "&fb=" + m_astro.composeFile2.Replace(AppDomain.CurrentDomain.BaseDirectory + AppConfig.AstroGraphicPath() + @"Tmp\", "");
            Image1.Visible = true;
        }
示例#8
0
        protected void Unnamed1_Click(object sender, EventArgs e)
        {
            AstroMod m_astro = new AstroMod();

            m_astro.type = PublicValue.AstroType.benming;
            #region 设置实体各种参数
            m_astro.birth = DateTime.Parse(HiddenField4.Value);
            SYS_DistrictMod dis = SYS_DistrictBll.GetInstance().GetModel(int.Parse(HiddenField2.Value));
            if (string.IsNullOrEmpty(dis.Latitude) || string.IsNullOrEmpty(dis.longitude))
            {
                SYS_DistrictMod tmp = SYS_DistrictBll.GetInstance().GetModel(dis.UpSysNo);
                dis.Latitude  = tmp.Latitude;
                dis.longitude = tmp.longitude;
            }
            m_astro.position = new LatLng(dis);
            if (HiddenField1.Value == "1")
            {
                m_astro.IsDayLight = AppEnum.BOOL.True;
            }
            else if (HiddenField1.Value == "0")
            {
                m_astro.IsDayLight = AppEnum.BOOL.False;
            }
            else
            {
                m_astro.IsDayLight = (AppEnum.BOOL)Convert.ToInt16(PublicDeal.GetInstance().IsDayLight(m_astro.birth, 0));
            }
            if (HiddenField6.Value == "g1")
            {
                m_astro.Gender = AppEnum.Gender.male;
            }
            else
            {
                m_astro.Gender = AppEnum.Gender.female;
            }

            m_astro.zone = -8;

            for (int i = 1; i < 21; i++)
            {
                m_astro.startsShow.Add(i, "");
            }
            m_astro.aspectsShow.Clear();
            for (int i = 1; i < 6; i++)
            {
                m_astro.aspectsShow.Add(i, 5);
            }
            #endregion

            AstroBiz.GetInstance().GetParamters(ref m_astro);
            Dictionary <PublicValue.AstroStar, Star> m_star = new Dictionary <PublicValue.AstroStar, Star>();
            foreach (Star tmpstar in m_astro.Stars)
            {
                m_star.Add(tmpstar.StarName, tmpstar);
            }
            string jsstr = "";
            //吉星
            List <PublicValue.AstroStar> goodstars = new List <PublicValue.AstroStar>();
            goodstars.Add(PublicValue.AstroStar.Jup);
            goodstars.Add(PublicValue.AstroStar.Ven);
            //凶星
            Dictionary <PublicValue.AstroStar, int> badstars = new Dictionary <PublicValue.AstroStar, int>();
            List <PublicValue.AstroStar>            tmpbad   = new List <PublicValue.AstroStar>();
            tmpbad.Add(PublicValue.AstroStar.Mar);
            tmpbad.Add(PublicValue.AstroStar.Sat);
            tmpbad.Add(PublicValue.AstroStar.Ura);
            tmpbad.Add(PublicValue.AstroStar.Nep);
            tmpbad.Add(PublicValue.AstroStar.Plu);
            List <PublicValue.AstroStar> twelve = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 12, false);
            List <PublicValue.AstroStar> eight  = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 8, false);
            List <PublicValue.AstroStar> seven  = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 7, false);
            List <PublicValue.AstroStar> two    = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 2, false);
            foreach (PublicValue.AstroStar tmp in tmpbad)
            {
                badstars.Add(tmp, 1);
            }
            foreach (PublicValue.AstroStar tmp in eight)
            {
                if (!tmpbad.Contains(tmp))
                {
                    if (!badstars.ContainsKey(tmp))
                    {
                        badstars.Add(tmp, 1);
                    }
                }
                else
                {
                    badstars[tmp]++;
                }
            }
            foreach (PublicValue.AstroStar tmp in twelve)
            {
                if (!tmpbad.Contains(tmp))
                {
                    if (!badstars.ContainsKey(tmp))
                    {
                        badstars.Add(tmp, 1);
                    }
                }
                else
                {
                    badstars[tmp]++;
                }
            }
            List <PublicValue.AstroStar> mingzhu = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 1, false);
            foreach (PublicValue.AstroStar tmp in mingzhu)
            {
                if (!tmpbad.Contains(tmp))
                {
                    if (!badstars.ContainsKey(tmp))
                    {
                        badstars.Add(tmp, 1);
                    }
                }
                else
                {
                    badstars[tmp]++;
                }
            }


            #region 花
            //Label1.Text = "1.金星星座为:" + PublicValue.GetConstellation(m_star[PublicValue.AstroStar.Ven].Constellation) + "<br/>";
            jsstr           += "showItem('hua', " + (int)m_star[PublicValue.AstroStar.Ven].Constellation + ");";
            ViewState["hua"] = (int)m_star[PublicValue.AstroStar.Ven].Constellation;
            #endregion

            #region 金星元素
            int venusEle = 0;
            venusEle = (int)PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Ven].Constellation);
            //Label1.Text += "2.金星星座元素为:" + PublicValue.GetElement(PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Ven].Constellation)) + "<br />";
            #endregion

            #region 红杏
            bool hongxing = false;
            if (PublicDeal.GetInstance().HasPhase(m_star[PublicValue.AstroStar.Ven], m_star[PublicValue.AstroStar.Jun], PublicValue.Phase.he, AppConst.DecimalNull) ||
                PublicDeal.GetInstance().HasPhase(m_star[PublicValue.AstroStar.Ven], m_star[PublicValue.AstroStar.Jun], PublicValue.Phase.chong, AppConst.DecimalNull) ||
                PublicDeal.GetInstance().HasPhase(m_star[PublicValue.AstroStar.Ven], m_star[PublicValue.AstroStar.Jun], PublicValue.Phase.xing, AppConst.DecimalNull))
            {
                hongxing = true;
            }
            ////Label1.Text += "金星:" + ((int)m_star[PublicValue.AstroStar.Ven].Constellation) * 30 + " " + m_star[PublicValue.AstroStar.Ven].Degree + " " + m_star[PublicValue.AstroStar.Ven].Cent / 60 * 100;
            ////Label1.Text += "婚神:" + ((int)m_star[PublicValue.AstroStar.Jun].Constellation) * 30 + " " + m_star[PublicValue.AstroStar.Jun].Degree + " " + m_star[PublicValue.AstroStar.Jun].Cent / 60 * 100;
            //Label1.Text += "3.是否有红杏:" + (hongxing==true ? "有" : "没有") + "<br />";
            jsstr += "showItem('hongxing', " + (hongxing == true ? "1" : "0") + ");";
            if (hongxing)
            {
                li5.Style["display"] = "";
            }
            #endregion

            #region 蜜蜂
            int beecount = 0;
            List <PublicValue.AstroStar> beestars = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 7, false);
            //Label1.Text += "7宫主:";
            foreach (PublicValue.AstroStar tmpstar in beestars)
            {
                //Label1.Text += PublicValue.GetAstroStar(tmpstar);
            }
            //Label1.Text += "<br />";
            //Label1.Text += "凶星:";
            foreach (PublicValue.AstroStar tmpstar in badstars.Keys)
            {
                //Label1.Text += PublicValue.GetAstroStar(tmpstar);
            }
            //Label1.Text += "<br />";
            beestars.Add(PublicValue.AstroStar.Des);
            beestars.Add(PublicValue.AstroStar.Jun);
            foreach (PublicValue.AstroStar tmpstar in beestars)
            {
                int tmpflag = 0;
                if (tmpstar != goodstars[0] && PublicDeal.GetInstance().HasAnyMainPhase(m_star[tmpstar], m_star[goodstars[0]]))
                {
                    beecount++;
                    tmpflag = 1;
                }
                if (tmpstar != goodstars[1] && PublicDeal.GetInstance().HasAnyMainPhase(m_star[tmpstar], m_star[goodstars[1]]))
                {
                    beecount++;
                    if (tmpflag == 1)
                    {
                        beecount++;
                    }
                }
            }

            //Label1.Text += "4.蜜蜂指数为:" + beecount + "<br />";
            jsstr += "showItem('mifeng', " + (beecount + 1 > 3 ? 4 : beecount + 1) + ");";
            li1.Style["display"] = "";
            ViewState["bee"]     = beecount;
            #endregion



            #region 负面
            Dictionary <string, int> showele = new Dictionary <string, int>();
            showele.Add("paopao", 0);
            showele.Add("chongzi", 0);
            showele.Add("cu", 0);
            showele.Add("liehen", 0);
            showele.Add("bingdong", 0);
            showele.Add("zhezhi", 0);
            showele.Add("kuye", 0);

            List <PublicValue.AstroStar> breakstars = PublicDeal.GetInstance().GetGongMasters(m_astro.Stars, 7, false);
            breakstars.Add(PublicValue.AstroStar.Ven);
            breakstars.Add(PublicValue.AstroStar.Jun);
            breakstars.Add(PublicValue.AstroStar.Des);
            breakstars = breakstars.Distinct().ToList();
            foreach (PublicValue.AstroStar tmp in badstars.Keys)
            {
                //if (tmp != goodstars[0])
                //    continue;
                int tmpflag = 0;
                for (int i = 0; i < breakstars.Count; i++)
                {
                    if (PublicDeal.GetInstance().HasAnyBadPhase(m_star[tmp], m_star[breakstars[i]]))
                    {
                        bool Exact = false;
                        if (PublicDeal.GetInstance().HasAnyBadPhase(m_star[tmp], m_star[breakstars[i]], 1))
                        {
                            Exact = true;
                        }
                        switch (tmp)
                        {
                        case PublicValue.AstroStar.Mar:
                        case PublicValue.AstroStar.Sun:
                            showele["zhezhi"] += badstars[tmp];
                            if (Exact)
                            {
                                showele["zhezhi"]++;
                            }
                            break;

                        case PublicValue.AstroStar.Jup:
                        case PublicValue.AstroStar.Ven:
                            showele["kuye"] += badstars[tmp];
                            if (Exact)
                            {
                                showele["kuye"]++;
                            }
                            break;

                        case PublicValue.AstroStar.Sat:
                            showele["liehen"] += badstars[tmp];
                            if (Exact)
                            {
                                showele["liehen"]++;
                            }
                            break;

                        case PublicValue.AstroStar.Ura:
                            showele["bingdong"] += badstars[tmp];
                            if (Exact)
                            {
                                showele["bingdong"]++;
                            }
                            break;

                        case PublicValue.AstroStar.Nep:
                            showele["paopao"] += badstars[tmp];
                            if (Exact)
                            {
                                showele["paopao"]++;
                            }
                            break;

                        case PublicValue.AstroStar.Plu:
                        case PublicValue.AstroStar.Moo:
                            showele["cu"] += badstars[tmp];
                            if (Exact)
                            {
                                showele["cu"]++;
                            }
                            break;

                        case PublicValue.AstroStar.Mer:
                            showele["chongzi"] += badstars[tmp];
                            if (Exact)
                            {
                                showele["chongzi"]++;
                            }
                            break;
                        }
                        tmpflag++;
                        if (tmpflag > 1)
                        {
                            switch (tmp)
                            {
                            case PublicValue.AstroStar.Mar:
                            case PublicValue.AstroStar.Sun:
                                showele["zhezhi"]++;
                                break;

                            case PublicValue.AstroStar.Jup:
                            case PublicValue.AstroStar.Ven:
                                showele["kuye"]++;
                                break;

                            case PublicValue.AstroStar.Sat:
                                showele["liehen"]++;
                                break;

                            case PublicValue.AstroStar.Ura:
                                showele["bingdong"]++;
                                break;

                            case PublicValue.AstroStar.Nep:
                                showele["paopao"]++;
                                break;

                            case PublicValue.AstroStar.Plu:
                            case PublicValue.AstroStar.Moo:
                                showele["cu"]++;
                                break;

                            case PublicValue.AstroStar.Mer:
                                showele["chongzi"]++;
                                break;
                            }
                        }
                    }
                }
            }
            ////Label1.Text += "4.裂痕指数为:" + breakcount + "<br />";
            jsstr += "showItem('liehen', " + (showele["liehen"] > 3 ? 4 : showele["liehen"]) + ");";
            if (showele["liehen"] > 0)
            {
                li7.Style["display"] = "";
            }
            jsstr += "showItem('paopao', " + (showele["paopao"] > 3 ? 4 : showele["paopao"]) + ");";
            if (showele["paopao"] > 0)
            {
                li2.Style["display"] = "";
            }
            jsstr += "showItem('chongzi', " + (showele["chongzi"] > 2 ? 3 : showele["chongzi"]) + ");";
            if (showele["chongzi"] > 0)
            {
                li4.Style["display"] = "";
            }
            jsstr += "showItem('cu', " + (showele["cu"] > 2 ? 3 : showele["cu"]) + ");";
            if (showele["cu"] > 0)
            {
                li8.Style["display"] = "";
            }
            jsstr += "showItem('bingdong', " + (showele["bingdong"] > 2 ? 3 : showele["bingdong"]) + ");";
            if (showele["bingdong"] > 0)
            {
                li6.Style["display"] = "";
            }
            jsstr += "showItem('zhezhi', " + (showele["zhezhi"] > 4 ? 4 : showele["zhezhi"]) + ");";
            if (showele["zhezhi"] > 0)
            {
                li3.Style["display"] = "";
            }
            jsstr += "showItem('kuzhi', " + (showele["kuye"] > 3 ? 3 : showele["kuye"]) + ");";
            if (showele["kuye"] > 0)
            {
                li9.Style["display"] = "";
            }
            int totalbad = showele["paopao"] + showele["chongzi"] + showele["cu"] + showele["liehen"] + showele["bingdong"] + showele["zhezhi"] + showele["kuye"];
            span1.Style["width"] = ((4096 - totalbad * 128) / 32).ToString() + "px";
            ltr1.Text            = ((3200 - totalbad * 100) / 32).ToString();
            if (ltr1.Text == "0")
            {
                span1.Style["width"] = (1 * 128 / 100).ToString() + "px";
                ltr1.Text            = "1";
            }
            if (hongxing && int.Parse(ltr1.Text) >= 70)
            {
                ltr1.Text            = (int.Parse(ltr1.Text) - 15).ToString();
                span1.Style["width"] = (int.Parse(ltr1.Text) * 128 / 100).ToString() + "px";
            }
            if (int.Parse(ltr1.Text) > 100)
            {
                span1.Style["width"] = "128px";
                ltr1.Text            = "100";
            }
            ViewState["fumian"] = showele;
            ////Label1.Text += "5.泡泡:" + showele["paopao"] + "; 虫子:" + showele["chongzi"] + "; 醋:" + showele["cu"] + "; 裂痕:" + showele["liehen"] + "; 冰冻:" + showele["bingdong"] + "; 折枝:" + showele["zhezhi"] + "; 枯叶:" + showele["kuye"] + "<br />";
            #endregion

            #region 花盆
            int huapen = 1;
            if (totalbad >= 20)
            {
                huapen = 3;
            }
            else if ((totalbad >= 13 && totalbad < 20) || (hongxing && totalbad > 6))
            {
                huapen = 2;
            }
            //Label1.Text += "5.花盆为:" + huapen + "<br />";
            jsstr += "showItem('huapen', " + huapen + ");";
            #endregion

            #region 花心指数
            int flowercount = 0;
            foreach (PublicValue.AstroStar tmpstar in goodstars)
            {
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]))
                {
                    flowercount++;
                }
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Chi], m_star[tmpstar]))
                {
                    flowercount++;
                }
                foreach (PublicValue.AstroStar tmpstarr in eight)
                {
                    if (tmpstar != tmpstarr && PublicDeal.GetInstance().HasAnyMainPhase(m_star[tmpstarr], m_star[tmpstar]))
                    {
                        flowercount++;
                    }
                }
            }
            if (m_star[PublicValue.AstroStar.Moo].Constellation == PublicValue.Constellation.Gem ||
                m_star[PublicValue.AstroStar.Moo].Constellation == PublicValue.Constellation.Sag ||
                m_star[PublicValue.AstroStar.Moo].Constellation == PublicValue.Constellation.Pis)
            {
                flowercount++;
            }
            if (m_star[PublicValue.AstroStar.Ven].Constellation == PublicValue.Constellation.Gem ||
                m_star[PublicValue.AstroStar.Ven].Constellation == PublicValue.Constellation.Sag ||
                m_star[PublicValue.AstroStar.Ven].Constellation == PublicValue.Constellation.Pis)
            {
                flowercount++;
            }
            if (m_star[PublicValue.AstroStar.Des].Constellation == PublicValue.Constellation.Gem ||
                m_star[PublicValue.AstroStar.Des].Constellation == PublicValue.Constellation.Sag ||
                m_star[PublicValue.AstroStar.Des].Constellation == PublicValue.Constellation.Pis)
            {
                flowercount++;
            }
            if (m_star[PublicValue.AstroStar.Moo].Gong == 12)
            {
                flowercount++;
            }
            if (m_star[PublicValue.AstroStar.Ven].Gong == 12)
            {
                flowercount++;
            }
            if (PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Sun].Constellation) == PublicValue.Element.wind && PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Moo].Constellation) == PublicValue.Element.earth)
            {
                flowercount++;
            }
            if (PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Sun].Constellation) == PublicValue.Element.fire && PublicDeal.GetInstance().GetConstellationElement(m_star[PublicValue.AstroStar.Moo].Constellation) == PublicValue.Element.wind)
            {
                flowercount++;
            }
            if (m_astro.Gender == AppEnum.Gender.male)
            {
                flowercount++;
            }
            span3.Style["width"] = (flowercount * 128 / 10).ToString() + "px";
            ltr3.Text            = (flowercount * 100 / 10).ToString();
            if (ltr3.Text == "0")
            {
                span3.Style["width"] = (1 * 128 / 100).ToString() + "px";
                ltr3.Text            = "1";
            }
            if (int.Parse(ltr3.Text) > 100)
            {
                span3.Style["width"] = "128px";
                ltr3.Text            = "100";
            }
            //Label1.Text += "5.花心指数为:" + flowercount + "<br />";
            #endregion

            #region 魅力指数
            int meilicount = beecount;
            if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Ura], m_star[PublicValue.AstroStar.For]))
            {
                meilicount++;
            }
            if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Ura], m_star[PublicValue.AstroStar.Ven]))
            {
                meilicount++;
            }
            if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[PublicValue.AstroStar.Ven]))
            {
                meilicount++;
            }
            if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Sun], m_star[PublicValue.AstroStar.Jup]))
            {
                meilicount++;
            }
            span2.Style["width"] = (meilicount * 128 / 12).ToString() + "px";
            ltr2.Text            = (meilicount * 100 / 12).ToString();
            if (ltr2.Text == "0")
            {
                span2.Style["width"] = (1 * 128 / 100).ToString() + "px";
                ltr2.Text            = "1";
            }
            if (int.Parse(ltr2.Text) > 100)
            {
                span2.Style["width"] = "128px";
                ltr2.Text            = "100";
            }

            #endregion

            #region 对方有钱
            int richcount = PublicDeal.GetInstance().GetGongPower(m_astro.Stars, 8);
            if (richcount > 15)
            {
                richcount = 15;
            }
            foreach (PublicValue.AstroStar tmpstar in seven)
            {
                if (m_star[tmpstar].Gong == 8 || m_star[tmpstar].Gong == 7)
                {
                    richcount = richcount + 5;
                }
            }
            foreach (PublicValue.AstroStar tmpstar in eight)
            {
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[tmpstar]))
                {
                    richcount = richcount + 5;
                }
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[PublicValue.AstroStar.For]))
                {
                    richcount = richcount + 5;
                }
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[PublicValue.AstroStar.For]))
                {
                    richcount = richcount + 5;
                }
            }
            foreach (PublicValue.AstroStar tmpstar in two)
            {
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[tmpstar]))
                {
                    richcount = richcount + 5;
                }
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.For], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[PublicValue.AstroStar.For]))
                {
                    richcount = richcount + 5;
                }
                if (PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[tmpstar]) && PublicDeal.GetInstance().HasAnyMainPhase(m_star[PublicValue.AstroStar.Jun], m_star[PublicValue.AstroStar.For]))
                {
                    richcount = richcount + 5;
                }
            }
            if (m_star[PublicValue.AstroStar.Jun].Gong == 11)
            {
                richcount = richcount + 5;
            }
            if (m_star[PublicValue.AstroStar.Ura].Gong == 8)
            {
                richcount = richcount + 5;
            }

            span4.Style["width"] = (richcount * 128 / 30).ToString() + "px";
            ltr4.Text            = (richcount * 100 / 30).ToString();
            if (ltr4.Text == "0")
            {
                span4.Style["width"] = (1 * 128 / 100).ToString() + "px";
                ltr4.Text            = "1";
            }
            if (int.Parse(ltr4.Text) > 100)
            {
                span4.Style["width"] = "128px";
                ltr4.Text            = "100";
            }
            //Label1.Text += "6.对方有钱指数为:" + richcount + "<br />";
            //测试显示互溶关系
            List <List <PublicValue.AstroStar> > hurong = PublicDeal.GetInstance().GetHuRong(m_astro.Stars, true);
            foreach (List <PublicValue.AstroStar> tmplist in hurong)
            {
                foreach (PublicValue.AstroStar tmpstar in tmplist)
                {
                    //Label1.Text += PublicValue.GetAstroStar(tmpstar) + "->";
                }
                //Label1.Text += "<br />";
            }
            #endregion
            jsstr += @"$("".f-box"").children(""div:not(0)"").children(""div"").each(function () {
                                        if (!$(this).is(':has(a)')&&$(this).attr(""id"")!='nohover') {
                                            $(this).bind(""mouseenter"", function () {
                                                $(this).css(""cursor"", ""pointer"")
                                                var bgimg = $(this).css(""background-image"");
                                                bgimg = bgimg.replace("".png"", ""_on.png"");
                                                $(this).css(""background-image"", bgimg);
                                            }).bind(""mouseleave"", function () { 
                                                $(this).attr(""style"", "" "");
                                                $(this).css(""display"", ""block"");
                                            })
                                        }
                                        else {
                                            //蜜蜂等区域热点
                                            $(this).children(""a"").bind(""mouseenter"", function () {
                                                var bgimg = $(this).parent().css(""background-image"");
                                                bgimg = bgimg.replace("".png"", ""_on.png"");
                                                $(this).parent().css(""background-image"", bgimg);
                                            }).bind(""mouseleave"", function () {
                                                $(this).parent().attr(""style"", "" "");
                                                $(this).parent().css(""display"", ""block"");
                                            })

                                        }

                                    })";
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "show", jsstr, true);
            tip.Style["display"]       = "none";
            ViewState["jsstr"]         = jsstr;
            MultiView1.ActiveViewIndex = 1;

            //Page.ClientScript.RegisterStartupScript(this.GetType(), "showflash",
            //        @"swfobject.embedSWF('LoveRose.swf', 'flashmov', '816', '459', '9.0.0',null,{ele:'"+ele+"'});",true);

            #region 记录用户数据
            LoveRoseMod m_record = new LoveRoseMod();
            m_record.Area      = int.Parse(HiddenField2.Value);
            m_record.BirthTime = m_astro.birth;
            m_record.Source    = (int)AppEnum.AppsSourceType.qq;
            m_record.TS        = DateTime.Now;
            LoveRoseBll.GetInstance().Add(m_record);
            #endregion

            #region 显示信息
            ltrInfo.Text = m_astro.birth.ToString("yyyy年MM月dd日 HH:mm") + @"
                    <br />
                    性别:" + AppEnum.GetGender(m_astro.Gender) + @"<br />
                    所属时区: " + (m_astro.zone > 0 ? "西" + m_astro.zone.ToString() : "东" + m_astro.zone.ToString()) + @"区<br />
                    夏令时:" + (((int)m_astro.IsDayLight) == 1 ? "是" : "否") + @"
                    <br />
                    出生地: " + m_astro.position.name.Remove(m_astro.position.name.LastIndexOf("-")) + @"
                    <br />
                    (经度" + m_astro.position.Lng + @"&nbsp;纬度" + m_astro.position.Lat + @")
                    <br />";
            #endregion

            HyperLink1.NavigateUrl = "http://share.v.t.qq.com/index.php?c=share&a=index&url=" + Server.UrlEncode("http://astro.fashion.qq.com/app/aiqinghua.htm") +
                                     "&pic=" + Server.UrlEncode("../WebResources/Images/LoveRose/img/share" + ViewState["hua"].ToString() + ".jpg") + "&appkey=801402959&title=" + Server.UrlEncode("#腾讯星座爱情花# " + AppCmn.CommonTools.CutStr(content[int.Parse(ViewState["hua"].ToString()) - 1, 0], 50) + " 嘿嘿~这是我的爱情花!我的爱情婚姻原来是这样的。挺有意思,你也来玩玩吧!") + "&line1=&line2=&line3=";
        }
 protected void SetSolarArcs()
 {
     //生成ID并访问图片页
     SetPic(AppConfig.PPLiveUrl() + "PPLive/AstroChart.aspx?ID=" + AstroBiz.GetInstance().SetGraphicID(m_astro));
 }
示例#10
0
        public QA_QuestionShowMini <AstroMod> MapQA_QuestionShowMiniForAstro(DataRow input)
        {
            QA_QuestionShowMini <AstroMod> ret = new QA_QuestionShowMini <AstroMod>();

            if (input["Award"].ToString() != "")
            {
                ret.Award = int.Parse(input["Award"].ToString());
            }
            if (input["CateSysNo"].ToString() != "")
            {
                ret.CateSysNo = int.Parse(input["CateSysNo"].ToString());
            }
            #region 设置星盘
            FATE_ChartMod m_chart = QA_QuestionBll.GetInstance().GetChartByQuest(int.Parse(input["SysNo"].ToString()));
            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
            ret.Context = input["Context"].ToString();
            if (input["NickName"] == null)
            {
                USR_CustomerMod m_customer = USR_CustomerBll.GetInstance().GetModel(int.Parse(input["CustomerSysNo"].ToString()));

                ret.CustomerNickName = m_customer.NickName;
                ret.CustomerPhoto    = m_customer.Photo;
            }
            else
            {
                ret.CustomerNickName = input["NickName"].ToString();
                ret.CustomerPhoto    = input["Photo"].ToString();
            }
            if (input["CustomerSysNo"].ToString() != "")
            {
                ret.CustomerSysNo = int.Parse(input["CustomerSysNo"].ToString());
            }
            ret.DR = int.Parse(input["DR"].ToString());
            if (input["EndTime"].ToString() != "")
            {
                ret.EndTime = DateTime.Parse(input["EndTime"].ToString());
            }
            else
            {
                ret.EndTime = AppConst.DateTimeNull;
            }
            if (input["IsSecret"].ToString() != "")
            {
                ret.IsSecret = int.Parse(input["IsSecret"].ToString());
            }
            if (input["LastReplyTime"].ToString() != "")
            {
                ret.LastReplyTime = DateTime.Parse(input["LastReplyTime"].ToString());
            }
            else
            {
                ret.LastReplyTime = AppConst.DateTimeNull;
            }
            if (input["LastReplyUser"].ToString() != "")
            {
                ret.LastReplyUser = int.Parse(input["LastReplyUser"].ToString());
            }
            if (input["ReadCount"].ToString() != "")
            {
                ret.ReadCount = int.Parse(input["ReadCount"].ToString());
            }
            if (input["ReplyCount"].ToString() != "")
            {
                ret.ReplyCount = int.Parse(input["ReplyCount"].ToString());
            }
            if (input["SysNo"].ToString() != "")
            {
                ret.SysNo = int.Parse(input["SysNo"].ToString());
            }
            ret.Title = input["Title"].ToString();
            if (input["TS"].ToString() != "")
            {
                ret.TS = DateTime.Parse(input["TS"].ToString());
            }
            else
            {
                ret.TS = AppConst.DateTimeNull;
            }
            return(ret);
        }
示例#11
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));
        }
示例#12
0
 public void SetParaLink()
 {
     AstroBiz.GetInstance().GetParamters(ref m_astro);
 }
示例#13
0
        public ReturnValue <AstroMod> TimeToAstro(Stream openPageData)
        {
            AstroMod     input      = null;
            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);

            if (!string.IsNullOrEmpty(textJson))
            {
                input = XMS.Core.Json.JsonSerializer.Deserialize <AstroMod>(textJson);
            }

            if (input == null)
            {
                input            = new AstroMod();
                input.birth      = DateTime.Now;
                input.position   = new LatLng(SYS_DistrictBll.GetInstance().GetModel(37));
                input.IsDayLight = AppEnum.BOOL.False;
                input.zone       = -8;

                input.birth1      = DateTime.Now.AddDays(-300);
                input.position1   = new LatLng(SYS_DistrictBll.GetInstance().GetModel(37));
                input.IsDayLight1 = AppEnum.BOOL.False;
                input.zone1       = -8;
                input.type        = PublicValue.AstroType.benming;
                input.compose     = PublicValue.AstroZuhe.bijiao;
            }
            input.startsShow.Clear();
            for (int i = 1; i <= 30; i++)
            {
                input.startsShow.Add(i, PublicValue.GetAstroStar((PublicValue.AstroStar)i));
            }
            input.aspectsShow.Clear();
            input.aspectsShow.Add(1, 0);
            input.aspectsShow.Add(2, 180);
            input.aspectsShow.Add(4, 120);
            input.aspectsShow.Add(3, 90);
            input.aspectsShow.Add(5, 60);


            //input.graphicID = AstroBiz.GetInstance().SetGraphicID(input);

            if ((input.type == PublicValue.AstroType.hepan && input.compose == PublicValue.AstroZuhe.bijiao) || (input.type == PublicValue.AstroType.tuiyun && input.transit == PublicValue.AstroTuiyun.xingyun))
            {
                AstroMod tmpinput = new AstroMod();
                tmpinput.aspectsShow = input.aspectsShow;
                tmpinput.startsShow  = input.startsShow;
                tmpinput.birth       = input.birth;
                tmpinput.position    = input.position;
                tmpinput.IsDayLight  = input.IsDayLight;
                tmpinput.zone        = input.zone;
                AstroBiz.GetInstance().GetParamters(ref tmpinput);
                input.Stars = tmpinput.Stars;

                tmpinput             = new AstroMod();
                tmpinput.aspectsShow = input.aspectsShow;
                tmpinput.startsShow  = input.startsShow;
                tmpinput.birth       = input.birth1;
                tmpinput.position    = input.position1;
                tmpinput.IsDayLight  = input.IsDayLight1;
                tmpinput.zone        = input.zone1;
                AstroBiz.GetInstance().GetParamters(ref tmpinput);
                input.Stars1 = tmpinput.Stars;
            }
            else
            {
                AstroBiz.GetInstance().GetParamters(ref input);
                input.Stars1 = null;
            }
            return(ReturnValue <AstroMod> .Get200OK(input));
        }