Esempio n. 1
0
        public ISlideCollection _plus_jp_wanhua_1(string str, int cjbh)
        {
            try
            {
                var param = Cache_param_zb._param_jp.Where(m => m.cjid == cjbh);
                var p     = new Presentation();
                var t     = p.Slides;
                t.RemoveAt(0);
                foreach (var item in param)
                {
                    var tp   = new Presentation(str);
                    var temp = tp.Slides;

                    #region 竞品分布
                    var        page1 = temp[0];
                    IAutoShape text1 = (IAutoShape)page1.Shapes[1];
                    text1.TextFrame.Text = string.Format(text1.TextFrame.Text, item.bamc);
                    #endregion
                    t.AddClone(page1);



                    #region 格局统计
                    var       page2 = temp[1];
                    DataTable dt    = new DataTable();

                    dt.Columns.Add(Base_Config_Jzgj.项目名称);
                    dt.Columns.Add(Base_Config_Jzgj.业态);
                    dt.Columns.Add(Base_Config_Jzgj.竞争格局_主力面积区间);
                    dt.Columns.Add(Base_Config_Cjba.本周_备案套数);
                    dt.Columns.Add(Base_Config_Cjba.本周_套内均价);
                    dt.Columns.Add(Base_Config_Rgsj.本周_认购套数);
                    dt.Columns.Add(Base_Config_Rgsj.本周_认购套内均价);
                    dt.Columns.Add(Base_Config_Rgsj.本周_活动);

                    IAutoShape text2 = (IAutoShape)page2.Shapes[1];
                    text2.TextFrame.Text = string.Format(text2.TextFrame.Text, item.bamc);
                    #endregion
                    if (item.jpxmlb != null && item.jpxmlb.Count > 0)
                    {
                        dt = GET_JPXM_BX(dt, item.jpxmlb);
                        Office_Tables.SetJP_WanHua_JPBX_Table(page2, dt, 2, null, null);
                        t.AddClone(page2);
                    }

                    foreach (var page3 in _plus_jp_dyt_tgtp(item))
                    {
                        t.AddClone(page3);
                    }
                }
                return(t);
            }
            catch (Exception e)
            {
                Base_Log.Log(e.Message);
                return(null);
            }
        }