Beispiel #1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblTableName.Text = oListPage.TableDetail.TableName;
                //this.CurrentHead = oListPage.TableDetail.TableName;
                if (Request["type"] != "1")
                {
                    this.s_xiangMuJL.Enabled = false;
                }

                #region 是否联机表
                if (oListPage.TableDetail.Is_OnlineTable == "1")
                {
                    //btnAddRecord.Visible = false;
                    //btnDel.Visible = false;
                }
                else
                {
                    //btnAddRecord.Visible = true;
                    //btnDel.Visible = true;
                }
                #endregion

                #region 填充 项目来源
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目来源");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region 填充 管理平台
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region 填充 项目状态
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目状态");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                this.RefreshGrid();
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                #region 填充 项目来源
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目来源");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region 填充 管理平台
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region 填充 项目状态
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目状态");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion



                //
                lblTableName.Text = oListPage.TableDetail.TableName;
                //


                this.RefreshGrid();
                if (base.isAdmin == true)
                {
                    this.btnDel.Enabled = true;
                }
                else
                {
                    this.btnDel.Enabled = false;
                }
            }
        }
Beispiel #3
0
        //取得管理平台  限定当前人员的管理平台权限
        protected string rtn_GuanLiPT_ForAll()
        {
            DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());

            string GuanLiPT = "'-1',";

            if (dv_GLPT.Count > 0)
            {
                for (int i = 0; i < dv_GLPT.Count; i++)
                {
                    GuanLiPT += "'" + dv_GLPT[i]["rowguid"].ToString() + "',";
                }
            }

            if (GuanLiPT.Length > 1)
            {
                return(GuanLiPT.Substring(0, GuanLiPT.Length - 1));
            }
            return(GuanLiPT);
        }
        //ȡ�ù���ƽ̨  �޶���ǰ��Ա�Ĺ���ƽ̨Ȩ��
        protected string rtn_GuanLiPT_ForAll()
        {
            DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());

            string GuanLiPT = "'-1',";
            if (dv_GLPT.Count > 0)
            {
                for (int i = 0; i < dv_GLPT.Count; i++)
                {

                    GuanLiPT += "'" + dv_GLPT[i]["rowguid"].ToString() + "',";

                }
            }

            if (GuanLiPT.Length > 1)
            {
                return GuanLiPT.Substring(0, GuanLiPT.Length - 1);
            }
            return GuanLiPT;
        }
        //����
        protected void btnExcel_ServerClick(object sender, System.EventArgs e)
        {
            //�����Ǵ�ӡ����Ϣ
            int nTemplateID = 7; //��ӡģ��ID
            bool blnPreview = true; //�Ƿ���ҪԤ��
            //�Ȼ�ȡ������������Ŀ
            #region �Ȼ�ȡ������������Ŀ
            string str = " and s_Pro_Type='��ҵ��'";

            if (s_xiangMuJL.Text != "")
            {
                str += " and s_xiangMuJL like '%" + this.s_xiangMuJL.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (s_xiangMuMC.Text != "")
            {
                str += " and s_xiangMuMC like '%" + this.s_xiangMuMC.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (s_xiangMuGSQC.Text != "")
            {
                str += " and s_xiangMuGSQC like '%" + this.s_xiangMuGSQC.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (s_LiXiangSQR.Text != "")
            {
                str += " and s_LiXiangSQR like '%" + this.s_LiXiangSQR.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (s_dengJiR.Text != "")
            {
                str += " and s_dengJiR like '%" + this.s_dengJiR.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (this.d_dengJiRQ.FromText.ToString() != "")
            {
                str += " and d_dengJiRQ>'" + DateTime.Parse(this.d_dengJiRQ.FromText.ToString()).AddDays(-1) + "'";
            }
            if (this.d_dengJiRQ.ToText.ToString() != "")
            {
                str += " and d_dengJiRQ<'" + DateTime.Parse(this.d_dengJiRQ.ToText.ToString()).AddDays(1) + "'";
            }
            if (this.s_suoShuHY.Text.ToString() != "")
            {
                str += " and s_suoShuHY='" + this.s_suoShuHY.Text.ToString() + "'";
            }
            if (this.s_xiangMuLY.SelectedValue.ToString() != "")
            {
                str += " and s_xiangMuLY_Drop=" + this.s_xiangMuLY.SelectedValue.ToString();
            }
            if (this.s_GuanLiPT.SelectedValue.ToString() != "")
            {
                string GuanLiPT = rtn_GuanLiPT();

                str += " and s_guanLiPT in (" + GuanLiPT + ")";

            }
            if (this.s_xiangMuZT.SelectedValue.ToString() != "")
            {
                string xiangMuZTList = rtn_xiangMuZT();

                str += " and s_xiangMuZT in (" + xiangMuZTList + ")";
            }
            str += " and (s_del_TrueOrFalse is Null or s_del_TrueOrFalse='')";

            string GuanLiPT_All = rtn_GuanLiPT_ForAll();

            str += " and s_guanLiPT in (" + GuanLiPT_All + ")";

            DataView dvProjects = new SVGBLL.Pro_Fund().GetProjectsForPrint(str);

            #endregion
            StringBuilder sb = new StringBuilder();
            sb.Append("<��ӡ����>");
            sb.Append("<ҳ>");
            sb.Append("<����>");
            sb.Append("<��չ��>");
            sb.Append("<��Ŀ��>");//��Ŀ��ϸΪ��չ�������

            for (int i = 0; i < dvProjects.Count; i++)
            {

                sb.Append("<Row>");
                //����
                sb.Append("<Num>" + (i+1).ToString() + "</Num>");
                sb.Append("<guanLiPT>" + new SVGBLL.Pro_Fund().Get_GuanLiPTByGuanLiPTGuid( dvProjects[i]["s_guanLiPT"].ToString()) + "</guanLiPT>");
                sb.Append("<chuZiZhuTi>" + dvProjects[i]["s_chuZiZhuTi"].ToString() + "</chuZiZhuTi>");
                sb.Append("<xiangMuBH>" + dvProjects[i]["s_xiangMuBH"].ToString() + "</xiangMuBH>");
                sb.Append("<xiangMuMC>" + dvProjects[i]["s_xiangMuMC"].ToString() + "</xiangMuMC>");
                sb.Append("<xiangMuJL>" + dvProjects[i]["s_xiangMuJL"].ToString() + "</xiangMuJL>");
                sb.Append("<xiangMuZT>" + dvProjects[i]["s_xiangMuZT"].ToString() + "</xiangMuZT>");
                sb.Append("<xiangMuGSQC>" + dvProjects[i]["s_xiangMuGSQC"].ToString() + "</xiangMuGSQC>");

                sb.Append("<LiXiangPSSJ>" + dvProjects[i]["d_JZDCPSSJ"].ToString() + "</LiXiangPSSJ>");
                sb.Append("<JueCePSSJ>" + dvProjects[i]["d_JueCePSSJ"].ToString() + "</JueCePSSJ>");

                //���ݽ���
                sb.Append("</Row>");
            }

            sb.Append("</��Ŀ��>");
            sb.Append("</��չ��>");
            sb.Append("</����>");
            sb.Append("</ҳ>");
            sb.Append("</��ӡ����>");

            //hidXmlData.Value = sb.ToString();

            //Epoint.MisBizLogic2.Print.PrintExecuter.PrintPage(nTemplateID, blnPreview, this, hidXmlData.ClientID);//ǰ����������Ϊ����ӡģ��ID���Ƿ���ʾԤ��ҳ�档
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {

                #region ��� ��Ŀ��Դ
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("���ݴ�Ͷ_��Ŀ��Դ");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region ��� ����ƽ̨
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region ��� ��Ŀ״̬
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("���ݴ�Ͷ_��Ŀ״̬");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region ��ʱ��ת��Ϊ����ʱ��
                int thisYear = DateTime.Now.Year;
                int thisMonth = DateTime.Now.Month;
                string JD = "";
                JD += thisYear + "-";
                if (thisMonth.ToString() == "1" || thisMonth.ToString() == "2" || thisMonth.ToString() == "3")
                {
                    JD += "01-01 00:00:00";
                }
                else if (thisMonth.ToString() == "4" || thisMonth.ToString() == "5" || thisMonth.ToString() == "6")
                {
                    JD += "04-01 00:00:00";
                }
                else if (thisMonth.ToString() == "7" || thisMonth.ToString() == "8" || thisMonth.ToString() == "9")
                {
                    JD += "07-01 00:00:00";
                }
                else
                {
                    JD += "10-01 00:00:00";
                }
                ViewState["JD"] = JD;
                #endregion

                #region ת����ǰʱ��
                DateTime dt = DateTime.Parse(thisYear + "-" + thisMonth + "-01 00:00:00");
                ViewState["YC"] = dt;
                ViewState["YM"] = dt.AddMonths(1).AddSeconds(-1);
                #endregion

                //
                lblTableName.Text = oListPage.TableDetail.TableName;
                //

                this.RefreshGrid();
                //GridExcel.Visible = true;
            }
        }
Beispiel #7
0
        //导出
        protected void btnExcel_ServerClick(object sender, System.EventArgs e)
        {
            //这里是打印的信息
            int  nTemplateID = 7;    //打印模板ID
            bool blnPreview  = true; //是否需要预览

            //先获取符合条件的项目
            #region 先获取符合条件的项目
            string str = " and s_Pro_Type='企业类'";

            if (s_xiangMuJL.Text != "")
            {
                str += " and s_xiangMuJL like '%" + this.s_xiangMuJL.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (s_xiangMuMC.Text != "")
            {
                str += " and s_xiangMuMC like '%" + this.s_xiangMuMC.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (s_xiangMuGSQC.Text != "")
            {
                str += " and s_xiangMuGSQC like '%" + this.s_xiangMuGSQC.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (s_LiXiangSQR.Text != "")
            {
                str += " and s_LiXiangSQR like '%" + this.s_LiXiangSQR.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (s_dengJiR.Text != "")
            {
                str += " and s_dengJiR like '%" + this.s_dengJiR.Text.Replace("'", "''").Replace("_", "\\_").Replace("%", "\\%") + "%'";
            }

            if (this.d_dengJiRQ.FromText.ToString() != "")
            {
                str += " and d_dengJiRQ>'" + DateTime.Parse(this.d_dengJiRQ.FromText.ToString()).AddDays(-1) + "'";
            }
            if (this.d_dengJiRQ.ToText.ToString() != "")
            {
                str += " and d_dengJiRQ<'" + DateTime.Parse(this.d_dengJiRQ.ToText.ToString()).AddDays(1) + "'";
            }
            if (this.s_suoShuHY.Text.ToString() != "")
            {
                str += " and s_suoShuHY='" + this.s_suoShuHY.Text.ToString() + "'";
            }
            if (this.s_xiangMuLY.SelectedValue.ToString() != "")
            {
                str += " and s_xiangMuLY_Drop=" + this.s_xiangMuLY.SelectedValue.ToString();
            }
            if (this.s_GuanLiPT.SelectedValue.ToString() != "")
            {
                string GuanLiPT = rtn_GuanLiPT();

                str += " and s_guanLiPT in (" + GuanLiPT + ")";
            }
            if (this.s_xiangMuZT.SelectedValue.ToString() != "")
            {
                string xiangMuZTList = rtn_xiangMuZT();

                str += " and s_xiangMuZT in (" + xiangMuZTList + ")";
            }
            str += " and (s_del_TrueOrFalse is Null or s_del_TrueOrFalse='')";

            string GuanLiPT_All = rtn_GuanLiPT_ForAll();

            str += " and s_guanLiPT in (" + GuanLiPT_All + ")";

            DataView dvProjects = new SVGBLL.Pro_Fund().GetProjectsForPrint(str);

            #endregion
            StringBuilder sb = new StringBuilder();
            sb.Append("<打印内容>");
            sb.Append("<页>");
            sb.Append("<数据>");
            sb.Append("<扩展表>");
            sb.Append("<项目行>");//项目明细为扩展标的名称


            for (int i = 0; i < dvProjects.Count; i++)
            {
                sb.Append("<Row>");
                //内容
                sb.Append("<Num>" + (i + 1).ToString() + "</Num>");
                sb.Append("<guanLiPT>" + new SVGBLL.Pro_Fund().Get_GuanLiPTByGuanLiPTGuid(dvProjects[i]["s_guanLiPT"].ToString()) + "</guanLiPT>");
                sb.Append("<chuZiZhuTi>" + dvProjects[i]["s_chuZiZhuTi"].ToString() + "</chuZiZhuTi>");
                sb.Append("<xiangMuBH>" + dvProjects[i]["s_xiangMuBH"].ToString() + "</xiangMuBH>");
                sb.Append("<xiangMuMC>" + dvProjects[i]["s_xiangMuMC"].ToString() + "</xiangMuMC>");
                sb.Append("<xiangMuJL>" + dvProjects[i]["s_xiangMuJL"].ToString() + "</xiangMuJL>");
                sb.Append("<xiangMuZT>" + dvProjects[i]["s_xiangMuZT"].ToString() + "</xiangMuZT>");
                sb.Append("<xiangMuGSQC>" + dvProjects[i]["s_xiangMuGSQC"].ToString() + "</xiangMuGSQC>");

                sb.Append("<LiXiangPSSJ>" + dvProjects[i]["d_JZDCPSSJ"].ToString() + "</LiXiangPSSJ>");
                sb.Append("<JueCePSSJ>" + dvProjects[i]["d_JueCePSSJ"].ToString() + "</JueCePSSJ>");

                //内容结束
                sb.Append("</Row>");
            }


            sb.Append("</项目行>");
            sb.Append("</扩展表>");
            sb.Append("</数据>");
            sb.Append("</页>");
            sb.Append("</打印内容>");

            //hidXmlData.Value = sb.ToString();

            //Epoint.MisBizLogic2.Print.PrintExecuter.PrintPage(nTemplateID, blnPreview, this, hidXmlData.ClientID);//前面两个参数为:打印模板ID、是否显示预览页面。
        }
Beispiel #8
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                #region 填充 项目来源
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目来源");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region 填充 管理平台
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region 填充 项目状态
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目状态");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region 将时间转化为季度时间
                int    thisYear  = DateTime.Now.Year;
                int    thisMonth = DateTime.Now.Month;
                string JD        = "";
                JD += thisYear + "-";
                if (thisMonth.ToString() == "1" || thisMonth.ToString() == "2" || thisMonth.ToString() == "3")
                {
                    JD += "01-01 00:00:00";
                }
                else if (thisMonth.ToString() == "4" || thisMonth.ToString() == "5" || thisMonth.ToString() == "6")
                {
                    JD += "04-01 00:00:00";
                }
                else if (thisMonth.ToString() == "7" || thisMonth.ToString() == "8" || thisMonth.ToString() == "9")
                {
                    JD += "07-01 00:00:00";
                }
                else
                {
                    JD += "10-01 00:00:00";
                }
                ViewState["JD"] = JD;
                #endregion

                #region 转化当前时间
                DateTime dt = DateTime.Parse(thisYear + "-" + thisMonth + "-01 00:00:00");
                ViewState["YC"] = dt;
                ViewState["YM"] = dt.AddMonths(1).AddSeconds(-1);
                #endregion

                //
                lblTableName.Text = oListPage.TableDetail.TableName;
                //


                this.RefreshGrid();
                //GridExcel.Visible = true;
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblTableName.Text = oListPage.TableDetail.TableName;
                //this.CurrentHead = oListPage.TableDetail.TableName;
                if (Request["type"] != "1")
                {
                    this.s_xiangMuJL.Enabled = false;
                }

                #region �Ƿ�������
                if (oListPage.TableDetail.Is_OnlineTable == "1")
                {
                    //btnAddRecord.Visible = false;
                    //btnDel.Visible = false;
                }
                else
                {
                    //btnAddRecord.Visible = true;
                    //btnDel.Visible = true;
                }
                #endregion

                #region ��� ��Ŀ��Դ
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("���ݴ�Ͷ_��Ŀ��Դ");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region ��� ����ƽ̨
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region ��� ��Ŀ״̬
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("���ݴ�Ͷ_��Ŀ״̬");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                this.RefreshGrid();
            }
        }