Пример #1
0
        private void SJDDL()
        {
            sj.Items.Clear();
            string sql = "select ST_NAME,ST_ID FROM TBDS_STAFFINFO WHERE ST_POSITION='0202'";

            DBCallCommon.BindDdl(sj, sql, "ST_NAME", "ST_ID");
        }
Пример #2
0
        private void ddlfzr()
        {
            ddl_fzr.Items.Clear();
            string sql = "select ST_ID,ST_NAME FROM TBDS_STAFFINFO WHERE ST_POSITION='0202'";

            DBCallCommon.BindDdl(ddl_fzr, sql, "ST_NAME", "ST_ID");
        }
Пример #3
0
        private void ddlleixing()
        {
            ddl_leixing.Items.Clear();
            string sql = "select ID,TYPE FROM TBOM_SHENHE WHERE STATE='0'";

            DBCallCommon.BindDdl(ddl_leixing, sql, "TYPE", "ID");
        }
Пример #4
0
        private void GetModelName()
        {
            sqlText = "select MODEL_ID+'|'+MODEL_NAME as NAME,MODEL_ID from TBMP_MAINPLANMODEL";
            string dataText  = "NAME";
            string dataValue = "MODEL_ID";

            DBCallCommon.BindDdl(ddlModel, sqlText, dataText, dataValue);
        }
Пример #5
0
        //private void code_selectchange()
        //{
        //    int j = 0;
        //    DataTable dt_code_fill;
        //    for (int i = 0; i < GridView1.Rows.Count; i++)
        //    {
        //        GridViewRow gr = GridView1.Rows[i];
        //        if (i==0)
        //        {
        //            string sql_code_fill = "select * from View_TBOM_GDZCAPPLY where CODE='" + ((DropDownList)gr.FindControl("ddl_code")).SelectedValue.ToString() + "' and STATE='6'";
        //            dt_code_fill = DBCallCommon.GetDTUsingSqlText(sql_code_fill);
        //            int rows_count = dt_code_fill.Rows.Count;
        //        }
        //        for (j; j < dt_code_fill.Rows.Count;j++ )
        //        {
        //            ((DropDownList)gr.FindControl("ddl_code")).SelectedValue = dt_code_fill.Rows[i]["CODE"].ToString();
        //            ((HiddenField)e.FindControl("hfCODE")).Value = dt_code_fill.Rows[i]["CODE"].ToString();
        //            ((Label)e.FindControl("lbl_CODE")).Text = dt_code_fill.Rows[i]["CODE"].ToString();
        //            ((TextBox)e.FindControl("txt_Name")).Text = dt_code_fill.Rows[i]["NAME"].ToString();
        //            ((Label)e.FindControl("only_id")).Text = dt_code_fill.Rows[i]["ID"].ToString();
        //            ((TextBox)e.FindControl("txt_Model")).Text = dt_code_fill.Rows[i]["MODEL"].ToString();
        //            ((TextBox)e.FindControl("txt_Note")).Text = dt_code_fill.Rows[i]["NOTE"].ToString();
        //        }
        //        if (j<dt_code_fill.Rows.Count)
        //        {
        //            continue;
        //        }
        //    }
        //}

        private void GetBUMEN(DropDownList ddlobject, string value)
        {
            ddlobject.Items.Clear();
            string sql2 = "select DEP_NAME,DEP_CODE FROM TBDS_DEPINFO WHERE DEP_CODE LIKE '[0-9][0-9]'";

            DBCallCommon.BindDdl(ddlobject, sql2, "DEP_NAME", "DEP_CODE");
            ddlobject.SelectedValue = value;
        }
Пример #6
0
        private void GetPostData()//绑定岗位
        {
            string sqlText   = "select DEP_CODE,DEP_NAME from TBDS_DEPINFO where (DEP_CODE like '0601%' OR DEP_CODE like '01%') order by DEP_CODE";
            string dataText  = "DEP_NAME";
            string dataValue = "DEP_CODE";

            DBCallCommon.BindDdl(ddlSearch, sqlText, dataText, dataValue);
        }
        /// <summary>
        /// 绑定维护人姓名
        /// </summary>
        protected void BindWFName()
        {
            string sqltext   = "select distinct ST_NAME collate  Chinese_PRC_CS_AS_KS_WS AS ST_NAME,CLERK FROM VIEW_MATERIAL where ST_NAME IS NOT NULL order by ST_NAME collate  Chinese_PRC_CS_AS_KS_WS";
            string dataText  = "ST_NAME";
            string dataValue = "CLERK";

            DBCallCommon.BindDdl(ddlWFName, sqltext, dataText, dataValue);
        }
Пример #8
0
        private void GetSheBei()
        {
            sqlText = "select TSA_MAP+'|'+TSA_ENGNAME as ENGNAME,TSA_MAP from View_CM_Task where CM_CONTR='" + paint_contract.Text + "'";
            string dataText  = "ENGNAME";
            string dataValue = "TSA_MAP";

            DBCallCommon.BindDdl(ddlSheBei, sqlText, dataText, dataValue);
        }
Пример #9
0
        /// <summary>
        /// 填充任务号下拉框的数据
        /// </summary>
        protected void BindTsaId()
        {
            string sqltext   = "SELECT DISTINCT YS_TSA_ID AS DDLVALUE,YS_TSA_ID AS DDLTEXT FROM YS_COST_BUDGET ORDER BY YS_TSA_ID";
            string dataText  = "DDLTEXT";
            string dataValue = "DDLVALUE";

            DBCallCommon.BindDdl(ddl_YS_TSA_ID, sqltext, dataText, dataValue);
        }
        //执行人
        private void BindZxr()
        {
            string sqltext   = "SELECT piczdnm FROM View_TBPC_PURCHASEPLAN_IRQ_ORDER WHERE planno ='" + sf + "' GROUP BY piczdnm";
            string datatext  = "piczdnm";
            string datavalue = "piczdnm";

            DBCallCommon.BindDdl(zxr, sqltext, datatext, datavalue);
        }
        //采购员
        private void BindCgy()
        {
            string sqltext   = "SELECT cgrnm FROM View_TBPC_PURCHASEPLAN_IRQ_ORDER WHERE planno ='" + sf + "' GROUP BY cgrnm";
            string datatext  = "cgrnm";
            string datavalue = "cgrnm";

            DBCallCommon.BindDdl(cgy, sqltext, datatext, datavalue);
        }
        //材料类型
        private void BindCllx()
        {
            string sqltext   = "SELECT PUR_MASHAPE FROM View_TBPC_PURCHASEPLAN_IRQ_ORDER WHERE planno ='" + sf + "' GROUP BY PUR_MASHAPE";
            string datatext  = "PUR_MASHAPE";
            string datavalue = "PUR_MASHAPE";

            DBCallCommon.BindDdl(cllx, sqltext, datatext, datavalue);
        }
Пример #13
0
        private void ddlcard()
        {
            ddl_card.Items.Clear();
            string sql       = "select distinct(CARDID) as CARDID FROM TBOM_CAROILCARD";
            string datavalue = "CARDID";

            DBCallCommon.BindDdl(ddl_card, sql, datavalue, datavalue);
        }
Пример #14
0
        /// <summary>
        /// 绑定批号数据
        /// </summary>
        private void BindLotNums()
        {
            string sql_select_lotnum = "select PS_ID from  VIEW_TM_PAINTSCHEME where PS_ENGID='" + tsaid.Text + "'";
            string dataText          = "PS_ID";
            string dataValue         = "PS_ID";

            DBCallCommon.BindDdl(ddlLotNumList, sql_select_lotnum, dataText, dataValue);
        }
Пример #15
0
        protected void BindPerson()
        {
            string sql       = "SELECT ST_CODE,ST_NAME collate  Chinese_PRC_CS_AS_KS_WS AS [ST_NAME] FROM [dbo].[TBDS_STAFFINFO] WHERE [ST_CODE] LIKE '0702%' AND ST_PD='0' ORDER BY [ST_NAME] collate  Chinese_PRC_CS_AS_KS_WS";
            string dataText  = "ST_NAME";
            string dataValue = "ST_CODE";

            DBCallCommon.BindDdl(ddlBKPersonName, sql, dataText, dataValue);
        }
Пример #16
0
        protected void BindProject()//绑定项目名称下拉框
        {
            string sqltext   = "SELECT DISTINCT PCON_PJNAME AS DDLVALUE,PCON_PJNAME AS DDLTEXT FROM View_YS_COST_BUDGET_REAL where YS_REVSTATE='5' ";
            string dataText  = "DDLTEXT";
            string dataValue = "DDLVALUE";

            DBCallCommon.BindDdl(ddl_project, sqltext, dataText, dataValue);
        }
Пример #17
0
        private void DataPJname()  //绑定项目
        {
            sqltext = "select distinct CM_PROJ from View_TM_WXDetail";
            string DataText  = "CM_PROJ";
            string DataValue = "CM_PROJ";

            DBCallCommon.BindDdl(ddl_proj, sqltext, DataText, DataValue);
        }
Пример #18
0
        private void GetShebeiName(DropDownList ddlShebei)
        {
            string sqlText   = "select BM_TUHAO+'|'+BM_CHANAME as BM_ENGNAME from  TBPM_STRINFODQO  where BM_ENGID='" + tsaid.Text + "' and dbo.Splitnum(BM_XUHAO,'.')<=1";
            string dataText  = "BM_ENGNAME";
            string dataValue = "BM_ENGNAME";

            DBCallCommon.BindDdl(ddlShebei, sqlText, dataText, dataValue);
        }
Пример #19
0
        /// <summary>
        /// 填充设备名称下拉框的数据
        /// </summary>
        protected void BindEngineer()
        {
            string sqltext   = "SELECT DISTINCT YS_ENGINEERNAME AS DDLVALUE,YS_ENGINEERNAME AS DDLTEXT FROM YS_COST_BUDGET where YS_PROJECTNAME='" + ddl_project.SelectedItem.ToString() + "' ORDER BY YS_ENGINEERNAME";
            string dataText  = "DDLTEXT";
            string dataValue = "DDLVALUE";

            DBCallCommon.BindDdl(ddl_engineer, sqltext, dataText, dataValue);
        }
Пример #20
0
        private void DataPJname()
        {
            sqltext = "select distinct PROJECT from TBBS_CONREVIEW ";
            string DataText  = "PROJECT";
            string DataValue = "PROJECT";

            DBCallCommon.BindDdl(ddlpjname, sqltext, DataText, DataValue);
        }
Пример #21
0
        /// <summary>
        /// 填充制单人下拉框的数据
        /// </summary>
        protected void BindPer()
        {
            string sqltext   = "SELECT DISTINCT YS_ADDNAME AS DDLVALUE,YS_ADDNAME AS DDLTEXT FROM YS_COST_BUDGET ORDER BY YS_ADDNAME";
            string dataText  = "DDLTEXT";
            string dataValue = "DDLVALUE";

            DBCallCommon.BindDdl(ddl_addper, sqltext, dataText, dataValue);
        }
Пример #22
0
        private void DataENGname()
        {
            sqltext = "select distinct ENGINEER from TBBS_CONREVIEW where PROJECT='" + ddlpjname.SelectedValue + "'";
            string DataText  = "ENGINEER";
            string DataValue = "ENGINEER";

            DBCallCommon.BindDdl(ddlengname, sqltext, DataText, DataValue);
        }
Пример #23
0
        /// <summary>
        /// 绑定部件序号
        /// </summary>
        private void BindPartIndex()
        {
            string sql_select_partindex = "select BM_XUHAO from " + ViewState["str_table"] + " where BM_ENGID='" + ViewState["TaskId"] + "' and (BM_XUHAO like '[1-9].[0-9]' or BM_XUHAO like '[1-9].[1-9][0-9]' or BM_XUHAO like '[1-9][0-9].[0-9]' or BM_XUHAO like '[1-9][0-9].[1-9][0-9]') order by dbo.f_formatstr(BM_XUHAO, '.')";
            string datavale             = "BM_XUHAO";
            string datatext             = "BM_XUHAO";

            DBCallCommon.BindDdl(dplAllXuhao, sql_select_partindex, datatext, datavale);
        }
Пример #24
0
        private void DataYeZhu()
        {
            sqltext = "select distinct YEZHU from TBBS_CONREVIEW ";
            string DataText  = "YEZHU";
            string DataValue = "YEZHU";

            DBCallCommon.BindDdl(ddlyezhu, sqltext, DataText, DataValue);
        }
Пример #25
0
        /// <summary>
        /// 绑定批号数据
        /// </summary>
        private void BindLotNums()
        {
            string sql_select_lotnum = "select MS_ID from  TBPM_MSFORALLRVW where MS_ENGID='" + tsaid.Text + "' and MS_STATE='8' union select MS_PID from TBPM_MSCHANGE where MS_ENGID='" + tsaid.Text + "' and MS_STATE='8'";
            string dataText          = "MS_ID";
            string dataValue         = "MS_ID";

            DBCallCommon.BindDdl(ddlLotNumList, sql_select_lotnum, dataText, dataValue);
        }
Пример #26
0
        private void DataZhiDanRen()
        {
            sqltext = "select  distinct BC_DRAFTER,ST_NAME from TBBS_CONREVIEW left outer join TBDS_STAFFINFO on TBBS_CONREVIEW.BC_DRAFTER=TBDS_STAFFINFO.ST_CODE ";
            string DataText  = "ST_NAME";
            string DataValue = "BC_DRAFTER";

            DBCallCommon.BindDdl(ddlzhidanren, sqltext, DataText, DataValue);
        }
Пример #27
0
        private void GetCODE(DropDownList ddlobject, string value)
        {
            ddlobject.Items.Clear();
            string sql = "select DISTINCT(a.CODE) CODE FROM View_TBOM_GDZCAPPLY as a left join TBOM_GDZCIN as b on a.CODE=b.CODE WHERE a.STATUS='6' and b.ID is null and PCTYPE='0'";

            DBCallCommon.BindDdl(ddlobject, sql, "CODE", "CODE");
            ddlobject.SelectedValue = value;
        }
Пример #28
0
        protected void BindTask()//绑定工程名称下拉框
        {
            string sqltext   = "SELECT  PCON_EQNAME AS DDLVALUE,PCON_EQNAME AS DDLTEXT FROM View_YS_COST_BUDGET_REAL where YS_REVSTATE='5' and PCON_PJNAME='" + ddl_project.SelectedItem.ToString() + "' and PCON_ENGNAME='" + ddl_engineer.SelectedItem.ToString() + "'";
            string dataText  = "DDLTEXT";
            string dataValue = "DDLVALUE";

            DBCallCommon.BindDdl(ddl_task, sqltext, dataText, dataValue);
        }
Пример #29
0
        private void GetSYR(DropDownList ddlobject, string value)
        {
            ddlobject.Items.Clear();
            string sql2 = "select ST_ID,ST_NAME FROM from TBDS_STAFFINFO";

            DBCallCommon.BindDdl(ddlobject, sql2, "ST_NAME", "ST_ID");
            ddlobject.SelectedValue = value;
        }
Пример #30
0
        private void DataPJname()  //绑定项目
        {
            sqltext = "select distinct MS_PJID from " + tablename + "  where MS_STATE='8'order by MS_PJID";
            string DataText  = "MS_PJID";
            string DataValue = "MS_PJID";

            DBCallCommon.BindDdl(ddlpjname, sqltext, DataText, DataValue);
        }