Пример #1
0
        /// <summary>
        /// 绑定部件序号
        /// </summary>
        /// <param name="array_xuhao"></param>
        protected void BindPartXuhao(string[] array_xuhao)
        {
            int times = array_xuhao.Length - 2;

            if (array_xuhao.Length > 3)
            {
                for (int i = 0; i < times; i++)
                {
                    ddlXuhao.Items.Add(new ListItem(array_xuhao[i], array_xuhao[i]));
                }
                ddlXuhao.Items.Insert(0, new ListItem("-请选择-", "-请选择-"));
                ddlXuhao.SelectedIndex = 0;
            }
            else
            {
                if (array_xuhao[0].Length > 3)//单一部件序号
                {
                    ddlXuhao.Items.Add(new ListItem(array_xuhao[0], array_xuhao[0]));
                    ddlXuhao.Items.Insert(0, new ListItem("-请选择-", "-请选择-"));
                    ddlXuhao.SelectedIndex = 0;
                }
                else//顶级部件序号
                {
                    string sqltext   = "select BM_XUHAO,BM_XUHAO+'||'+BM_CHANAME as BM_CHANAME from " + strtable + " where BM_ENGID='" + ViewState["TaskId"].ToString() + "' AND (dbo.Splitnum(BM_XUHAO,'.')=1 or len(BM_XUHAO)=1) and BM_MSSTATE='0' order by dbo.f_formatstr(BM_XUHAO, '.')";
                    string dataText  = "BM_CHANAME";
                    string dataValue = "BM_XUHAO";
                    DBCallCommon.BindAJAXCombox(ddlXuhao, sqltext, dataText, dataValue);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 绑定项目名称
        /// </summary>
        protected void BindPjName()
        {
            string sqltext   = "select distinct PS_PJID+'||'+PS_PJNAME as PS_PJNAME,PS_PJID from VIEW_TM_PAINTSCHEME where PS_STATE='8'";
            string dataText  = "PS_PJNAME";
            string dataValue = "PS_PJID";

            DBCallCommon.BindAJAXCombox(ddlProName, sqltext, dataText, dataValue);
        }
Пример #3
0
        /// <summary>
        /// 绑定发运标志
        /// </summary>
        protected void GetFY()
        {
            string sql_text = "select distinct TSA_FY from View_TM_WorkAmount order by TSA_FY";
            string dataText = "TSA_FY";
            string dataVaue = "TSA_FY";

            DBCallCommon.BindAJAXCombox(ddlFY, sql_text, dataText, dataVaue);
        }
        /// <summary>
        /// 绑定设备名称
        /// </summary>
        protected void BindEngName()
        {
            string sql_eng   = "select  TSA_ID, TSA_ID+'|'+TSA_ENGNAME as TSA_ENGNAME from View_TM_TaskAssign where TSA_PJID='" + ddlProName.SelectedValue + "'  order by TSA_ID";
            string dataText  = "TSA_ENGNAME";
            string dataValue = "TSA_ID";

            DBCallCommon.BindAJAXCombox(ddlEngName, sql_eng, dataText, dataValue);
        }
        /// <summary>
        /// 绑定项目名称
        /// </summary>
        protected void BindProjName()
        {
            string sql_pj    = "select distinct TSA_PJID,TSA_PJID+'|'+isnull(CM_PROJ,'') as PJ_NAME from View_TM_TaskAssign order by TSA_PJID desc";
            string dataText  = "PJ_NAME";
            string dataValue = "TSA_PJID";

            DBCallCommon.BindAJAXCombox(ddlProName, sql_pj, dataText, dataValue);
        }
Пример #6
0
        /// <summary>
        /// 部件绑定
        /// </summary>
        private void GetddlNameData()
        {
            sqlText  = "select BM_ZONGXU+'|'+BM_CHANAME AS BM_CHANAME,BM_ZONGXU from View_TM_DQO ";
            sqlText += "where BM_ENGID='" + tsaid.Text + "' and  (BM_MARID='' or BM_MARID is null) order by BM_CHANAME collate  Chinese_PRC_CS_AS_KS_WS";
            string dataText  = "BM_CHANAME";
            string dataValue = "BM_ZONGXU";

            DBCallCommon.BindAJAXCombox(ddlbjname, sqlText, dataText, dataValue);
        }
Пример #7
0
        /// <summary>
        /// 绑定年份
        /// </summary>
        protected void BindYear()
        {
            string sql       = "select distinct (case when TSA_ADDTIME is null then '' else substring(TSA_ADDTIME,1,4)+'年' end) as YearText,(case when TSA_ADDTIME is null then '%' else substring(TSA_ADDTIME,1,4) end) as YearValue from View_TM_WorkAmount order by YearText";
            string dataText  = "YearText";
            string dataValue = "YearValue";

            DBCallCommon.BindAJAXCombox(ddlYear, sql, dataText, dataValue);

            ddlYear.Items.RemoveAt(0);
            ddlYear.Items.Insert(0, new ListItem("-年份-", "-年份-"));
            ddlYear.SelectedIndex = 0;
        }
Пример #8
0
 /// <summary>
 /// 绑定工程名称
 /// </summary>
 protected void BindEngName()
 {
     if (ddlProName.SelectedIndex != 0)
     {
         string sqltext   = "select distinct PS_ENGID,PS_ENGID+'||'+PS_ENGNAME as PS_ENGNAME from VIEW_TM_PAINTSCHEME where PS_PJID='" + ddlProName.SelectedValue + "'";
         string dataText  = "PS_ENGNAME";
         string dataValue = "PS_ENGID";
         DBCallCommon.BindAJAXCombox(ddlEngName, sqltext, dataText, dataValue);
     }
     else
     {
         ddlEngName.Items.Clear();
         ddlEngName.Items.Insert(0, new ListItem("-请选择-", "-请选择-"));
         ddlEngName.SelectedIndex = 0;
     }
 }
Пример #9
0
        /// <summary>
        /// 绑定批号
        /// </summary>
        protected void BindLotNum()
        {
            StringBuilder strb = new StringBuilder();

            strb.Append("select PS_ID from VIEW_TM_PAINTSCHEME where PS_STATE='8' ");
            if (ddlProName.SelectedIndex != 0)
            {
                strb.Append(" and PS_PJID='" + ddlProName.SelectedValue + "'");
            }

            if (ddlEngName.SelectedIndex != 0)
            {
                strb.Append(" and PS_ENGID='" + ddlEngName.SelectedValue + "'");
            }

            string dataText  = "PS_ID";
            string dataValue = "PS_ID";

            DBCallCommon.BindAJAXCombox(ddlLotNum, strb.ToString(), dataText, dataValue);
        }
Пример #10
0
        /// <summary>
        /// 绑定技术员
        /// </summary>
        protected void GetTecName()
        {
            ddlTecName.Items.Clear();
            StringBuilder str_sql = new StringBuilder();

            str_sql.Append("select distinct TSA_TCCLERK,isnull(ST_NAMECODE,' ')+'||'+ST_NAME as ST_NAME from View_TM_WorkAmount where 1=1");
            if (ddlProName.SelectedIndex != 0)
            {
                str_sql.Append("AND TSA_PJID='" + ddlProName.SelectedValue.ToString() + "'");
            }

            if (ddlEngName.SelectedIndex != 0)
            {
                str_sql.Append(" AND TSA_ID='" + ddlEngName.SelectedValue + "'");
            }

            string dataText  = "ST_NAME";
            string dataValue = "TSA_TCCLERK";

            DBCallCommon.BindAJAXCombox(ddlTecName, str_sql.ToString(), dataText, dataValue);
        }