Example #1
0
        public ISlideCollection _plus_jp_huaqiaocheng_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);

                //#region P1
                //foreach (var item in _plus_jp_dyt_jzgj(cjbh))
                //{
                //    if (item != null)
                //        t.AddClone(item);
                //}
                //#endregion
                foreach (var item in param)
                {
                    var tp   = new Presentation(str);
                    var temp = tp.Slides;

                    #region 竞品分布
                    foreach (var jpfb in _plus_jp_dyt_jzgj(item))
                    {
                        t.AddClone(jpfb);
                    }
                    #endregion
                    // t.AddClone(page1);

                    #region 格局统计
                    var page1 = temp[0];
                    System.Data.DataTable dt = new System.Data.DataTable();
                    dt.Columns.Add(Base_Config_Jzgj.项目名称);
                    dt.Columns.Add(Base_Config_Jzgj.业态);

                    dt.Columns.Add(Base_Config_Rgsj.本周_新开套数);
                    dt.Columns.Add(Base_Config_Rgsj.本周_新开销售套数);
                    dt.Columns.Add(Base_Config_Rgsj.本周_新开套内均价);


                    dt.Columns.Add(Base_Config_Rgsj.周_认购套数);
                    dt.Columns.Add(Base_Config_Rgsj.周_认购套内体量);
                    dt.Columns.Add(Base_Config_Rgsj.周_认购金额);
                    dt.Columns.Add(Base_Config_Rgsj.周_认购套内均价);

                    dt.Columns.Add(Base_Config_Rgsj.本周_认购套数);
                    dt.Columns.Add(Base_Config_Rgsj.本周_认购套内体量);
                    dt.Columns.Add(Base_Config_Rgsj.本周_认购金额);
                    dt.Columns.Add(Base_Config_Rgsj.本周_认购套内均价);


                    dt.Columns.Add(Base_Config_Rgsj.本周_营销动作);


                    IAutoShape text1 = (IAutoShape)page1.Shapes[4];
                    text1.TextFrame.Text = string.Format(text1.TextFrame.Text, item.bamc, item.ytcs[0]);

                    dt = GET_JPXM_BX(dt, item.jpxmlb);
                    #endregion
                    if (item.jpxmlb != null && item.jpxmlb.Count > 0)
                    {
                        dt = GET_JPXM_BX(dt, item.jpxmlb);
                        Office_Tables.SetJP_HuaQiaoCheng_Table(page1, dt, 2, null, null);
                        t.AddClone(page1);
                    }
                    foreach (var page3 in _plus_jp_dyt_tgtp(item))
                    {
                        t.AddClone(page3);
                    }
                }
                return(t);
            }
            catch (Exception e)
            {
                Base_Log.Log(e.Message);
                return(null);
            }
        }