コード例 #1
0
ファイル: RealQuery.aspx.cs プロジェクト: paddy235/YCJN
        private void Sec_data_bind()
        {
            BLL.BLLRealQuery BLQ = new BLL.BLLRealQuery();
            DataSet          DS  = BLQ.Get_Company_Info(out errMsg);
            DataSet          DSS = BLQ.Get_Electric_Info(DS.Tables[0].Rows[0]["T_COMPANYID"].ToString(), out errMsg);
            DataSet          DDS = BLQ.Get_Unit_Info(DSS.Tables[0].Rows[0]["T_PLANTID"].ToString(), out errMsg);

            this.sec_company.DataSource     = DS.Tables[0].DefaultView;
            this.sec_company.DataTextField  = "T_COMPANYDESC";
            this.sec_company.DataValueField = "T_COMPANYID";
            this.sec_company.DataBind();
            this.sec_electric.DataSource     = DSS.Tables[0].DefaultView;
            this.sec_electric.DataTextField  = "T_PLANTDESC";
            this.sec_electric.DataValueField = "T_PLANTID";
            this.sec_electric.DataBind();
            this.sec_crew.DataSource     = DDS.Tables[0].DefaultView;
            this.sec_crew.DataTextField  = "T_UNITDESC";
            this.sec_crew.DataValueField = "T_UNITID";
            this.sec_crew.DataBind();
            this.lb_point_name.DataSource     = BLQ.Get_Para_Info(DDS.Tables[0].Rows[0]["T_UNITID"].ToString(), out errMsg);
            this.lb_point_name.DataTextField  = "T_PARADESC";
            this.lb_point_name.DataValueField = "T_PARAID";
            this.lb_point_name.DataBind();
        }
コード例 #2
0
ファイル: Get_Chart_Data.aspx.cs プロジェクト: paddy235/YCJN
        protected void Page_Load(object sender, EventArgs e)
        {
            sec_type     = Request["sec_type"]; electric_id = Request["electric_id"]; crew_id = Request["crew_id"]; sec_type_real = Request["sec_type_real"]; electric_id_real = Request["electric_id_real"];
            crew_id_real = Request["crew_id_real"];

            //风电、太阳能选项改变时,绑定DropDownLIst数据
            if ((sec_type != "") && (sec_type != null))
            {
                DataSet DS  = BCA.Get_Electric_Info(sec_type, out errMsg);
                DataSet DDS = BCA.Get_Unit_Info(DS.Tables[0].Rows[0]["T_PLANTID"].ToString(), out errMsg);
                Return_dataset(DS);
                Return_dataset(DDS);
                DataSet DDDS  = BCA.Get_BASE_CRICPARA(DDS.Tables[0].Rows[0]["T_UNITID"].ToString(), out errMsg);
                int     count = 0;
                if (DDDS.Tables[0].Rows.Count > 0)
                {
                    sb.Append("<table><tr>");
                    for (int i = 0; i < DDDS.Tables[0].Rows.Count; i++)
                    {
                        count++;
                        if (count % 3 == 0)
                        {
                            sb.Append("<td width=\"300px\"><input type='checkbox' name='" + DDDS.Tables[0].Rows[i][1].ToString() + "' value='" + DDDS.Tables[0].Rows[i][0].ToString() + "'>&nbsp;&nbsp;&nbsp;" + DDDS.Tables[0].Rows[i][1].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></td></tr>");
                        }
                        else
                        {
                            sb.Append("<td width=\"300px\"><input type='checkbox' name='" + DDDS.Tables[0].Rows[i][1].ToString() + "' value='" + DDDS.Tables[0].Rows[i][0].ToString() + "'>&nbsp;&nbsp;&nbsp;" + DDDS.Tables[0].Rows[i][1].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>");
                        }
                        if ((count % 3 != 0) && (i == DDDS.Tables[0].Rows.Count - 1))
                        {
                            sb.Append("</tr>");
                        }
                        //sb.Append(DS.Tables[0].Rows[i][0].ToString() + "," + DS.Tables[0].Rows[i][1].ToString() + ";");
                    }
                    sb.Append("</table>");
                }
            }
            //分公司选项改变时,绑定DropDownLIst数据
            else if ((electric_id != "") && (electric_id != null))
            {
                Return_dataset(BCA.Get_Unit_Info(electric_id, out errMsg));

                DataSet DDDS  = BCA.Get_BASE_CRICPARA(BCA.Get_Unit_Info(electric_id, out errMsg).Tables[0].Rows[0]["T_UNITID"].ToString(), out errMsg);
                int     count = 0;
                if (DDDS.Tables[0].Rows.Count > 0)
                {
                    sb.Append("<table ><tr>");//border=\"1\"
                    for (int i = 0; i < DDDS.Tables[0].Rows.Count; i++)
                    {
                        count++;
                        if (count % 7 == 0)
                        {
                            sb.Append("<td><input type='checkbox' name='" + DDDS.Tables[0].Rows[i][1].ToString() + "' value='" + DDDS.Tables[0].Rows[i][0].ToString() + "'>" + DDDS.Tables[0].Rows[i][1].ToString() + "<br></td></tr>");
                        }
                        else
                        {
                            sb.Append("<td><input type='checkbox' name='" + DDDS.Tables[0].Rows[i][1].ToString() + "' value='" + DDDS.Tables[0].Rows[i][0].ToString() + "'>" + DDDS.Tables[0].Rows[i][1].ToString() + "</td>");
                        }
                        if ((count % 7 != 0) && (i == DDDS.Tables[0].Rows.Count - 1))
                        {
                            sb.Append("</tr>");
                        }
                        //sb.Append(DS.Tables[0].Rows[i][0].ToString() + "," + DS.Tables[0].Rows[i][1].ToString() + ";");
                    }
                    sb.Append("</table>");
                }
            }
            else if ((crew_id != "") && (crew_id != null))
            {
                DataSet DDDS  = BCA.Get_BASE_CRICPARA(crew_id, out errMsg);
                int     count = 0;
                if (DDDS.Tables[0].Rows.Count > 0)
                {
                    sb.Append("<table ><tr>");//border=\"1\"
                    for (int i = 0; i < DDDS.Tables[0].Rows.Count; i++)
                    {
                        count++;
                        if (count % 7 == 0)
                        {
                            sb.Append("<td><input type='checkbox' name='" + DDDS.Tables[0].Rows[i][1].ToString() + "' value='" + DDDS.Tables[0].Rows[i][0].ToString() + "'>" + DDDS.Tables[0].Rows[i][1].ToString() + "<br></td></tr>");
                        }
                        else
                        {
                            sb.Append("<td><input type='checkbox' name='" + DDDS.Tables[0].Rows[i][1].ToString() + "' value='" + DDDS.Tables[0].Rows[i][0].ToString() + "'>" + DDDS.Tables[0].Rows[i][1].ToString() + "</td>");
                        }
                        if ((count % 7 != 0) && (i == DDDS.Tables[0].Rows.Count - 1))
                        {
                            sb.Append("</tr>");
                        }
                        //sb.Append(DS.Tables[0].Rows[i][0].ToString() + "," + DS.Tables[0].Rows[i][1].ToString() + ";");
                    }
                    sb.Append("</table>");
                }
            }
            else if ((sec_type_real != "") && (sec_type_real != null))
            {
                DataSet DS   = BCA.Get_Electric_Info(sec_type_real, out errMsg);
                DataSet DDS  = BCA.Get_Unit_Info(DS.Tables[0].Rows[0]["T_PLANTID"].ToString(), out errMsg);
                DataSet DDDS = BCA.Get_Para_Info(DDS.Tables[0].Rows[0]["T_UNITID"].ToString(), out errMsg);
                Return_dataset(DS);
                Return_dataset(DDS);
                Return_dataset(DDDS);
            }
            else if ((electric_id_real != "") && (electric_id_real != null))
            {
                DataSet DS  = BCA.Get_Unit_Info(electric_id_real, out errMsg);
                DataSet DDS = BCA.Get_Para_Info(DS.Tables[0].Rows[0]["T_UNITID"].ToString(), out errMsg);
                Return_dataset(DS);
                Return_dataset(DDS);
            }
            else if ((crew_id_real != "") && (crew_id_real != null))
            {
                DataSet DS = BCA.Get_Para_Info(crew_id_real, out errMsg);
                Return_dataset(DS);
            }

            Response.Clear();
            Response.Write(sb.ToString());
            Response.End();
        }
コード例 #3
0
ファイル: RealQuery.aspx.cs プロジェクト: eseawind/YCJN
 private void Sec_data_bind()
 {
     BLL.BLLRealQuery BLQ = new BLL.BLLRealQuery();
     DataSet DS = BLQ.Get_Company_Info(out errMsg);
     DataSet DSS = BLQ.Get_Electric_Info(DS.Tables[0].Rows[0]["T_COMPANYID"].ToString(), out errMsg);
     DataSet DDS = BLQ.Get_Unit_Info(DSS.Tables[0].Rows[0]["T_PLANTID"].ToString(), out errMsg);
     this.sec_company.DataSource = DS.Tables[0].DefaultView;
     this.sec_company.DataTextField = "T_COMPANYDESC";
     this.sec_company.DataValueField = "T_COMPANYID";
     this.sec_company.DataBind();
     this.sec_electric.DataSource = DSS.Tables[0].DefaultView;
     this.sec_electric.DataTextField = "T_PLANTDESC";
     this.sec_electric.DataValueField = "T_PLANTID";
     this.sec_electric.DataBind();
     this.sec_crew.DataSource = DDS.Tables[0].DefaultView;
     this.sec_crew.DataTextField = "T_UNITDESC";
     this.sec_crew.DataValueField = "T_UNITID";
     this.sec_crew.DataBind();
     this.lb_point_name.DataSource = BLQ.Get_Para_Info(DDS.Tables[0].Rows[0]["T_UNITID"].ToString(), out errMsg);
     this.lb_point_name.DataTextField = "T_PARADESC";
     this.lb_point_name.DataValueField = "T_PARAID";
     this.lb_point_name.DataBind();
 }