Ejemplo n.º 1
0
        protected void ASPxListBox1_Callback(object sender, CallbackEventArgsBase e)
        {
            string[] param  = e.Parameter.Split(',');
            string   type   = param[0];
            string   pline1 = ASPxComboBoxPline.SelectedItem.Value.ToString();
            //string pline1 = param[1];
            //string begindate1 = param[1] ;
            string      begindate1 = ASPxDateEdit1.Date.ToString("yyyy-MM-dd");
            ASPxListBox location   = sender as ASPxListBox;

            if (type == "ALL")
            {
                //大线和改制返修如何区分,根据计划制定人员?
                string sql = "select plan_code||'; '||plan_so||'; '||plan_qty||'; '||pline_code ID1 from data_plan where pline_code='" + pline1 + "' and (plan_type='C' or plan_type='D') and begin_date=to_date('" + begindate1 + "','yyyy-mm-dd') and  confirm_flag='Y' and bom_flag='N' and item_flag='N' and third_flag='N' and run_flag='N' order by plan_code";

                DataTable dt = dc.GetTable(sql);
                location.DataSource = dt;
                location.DataBind();
            }
            if (type == "ALLW")
            {
                string sql = "select plan_code||'; '||plan_so||'; '||plan_qty||'; '||pline_code ID1 from data_plan where pline_code='" + pline1 + "' and (plan_type='C' or plan_type='D') and confirm_flag='Y' and bom_flag='N' and item_flag='N' and third_flag='N' and run_flag='N' order by plan_code";

                DataTable dt = dc.GetTable(sql);
                location.DataSource = dt;
                location.DataBind();
            }
            string sql1 = "select rmes_id,plan_code,plan_so,plan_qty,pline_code from data_plan where pline_code='" + pline1 + "' and (plan_type='C' or plan_type='D') and begin_date=to_date('" + begindate1 + "','yyyy-mm-dd') and  confirm_flag='Y' and bom_flag='N' and item_flag='N' and third_flag='N' and run_flag='N' order by plan_code";

            ASPxListBoxLocation.DataSource = dc.GetTable(sql1);
            ASPxListBoxLocation.DataBind();
        }
Ejemplo n.º 2
0
        protected void ProdCat_ListBox_Init(object sender, EventArgs e)
        {
            string docnum = MOPNum_Combo.Text.ToString();

            empty = string.IsNullOrEmpty(docnum);
            ASPxListBox list = sender as ASPxListBox;

            list.Columns.Clear();
            list.Items.Clear();

            //if (empty)
            list.DataSource = MRPClass.ProCategoryTable_WithoutAll();
            //else
            //list.DataSource = MRPClass.ProCategoryTable_Filter("");

            ListBoxColumn l_value = new ListBoxColumn();

            l_value.FieldName = "NAME";
            l_value.Caption   = "Code";
            l_value.Width     = 100;
            list.Columns.Add(l_value);

            ListBoxColumn l_text = new ListBoxColumn();

            l_text.FieldName = "DESCRIPTION";
            l_text.Caption   = "Description";
            l_text.Width     = 350;
            list.Columns.Add(l_text);

            list.ValueField = "NAME";
            list.TextField  = "DESCRIPTION";
            list.DataBind();
            list.ItemStyle.Wrap = DevExpress.Utils.DefaultBoolean.True;
            list.ClientEnabled  = false;
        }
Ejemplo n.º 3
0
    protected void listBoxLocation_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
    {
        //string pline = e.Parameter;
        string[]    param    = e.Parameter.Split(',');
        string      sss1     = param[0];
        string      sss2     = param[1];
        string      sss3     = param[2];
        ASPxListBox location = sender as ASPxListBox;

        //如果是装配工位排除已经对应过站点的工位
        string sql = "";

        if (sss2 == "A")
        {
            sql = "SELECT A.RMES_ID,A.LOCATION_CODE,A.LOCATION_CODE LOCATION_NAME FROM CODE_LOCATION A WHERE A.PLINE_CODE='"
                  + sss1 + "' AND NOT EXISTS(SELECT * FROM REL_STATION_LOCATION C WHERE C.LOCATION_CODE=A.RMES_ID  and c.LOCATION_FLAG='A' and PLINE_CODE='" + sss1 + "' ) "
                  + " AND NOT EXISTS(SELECT * FROM REL_STATION_LOCATION D WHERE D.LOCATION_CODE=A.RMES_ID   and D.station_code='" + sss3 + "' ) " //and c.LOCATION_FLAG='B'
                  + " ORDER BY A.LOCATION_CODE";                                                                                                  //
        }
        if (sss2 == "B")
        {
            sql = "SELECT A.RMES_ID,A.LOCATION_CODE,A.LOCATION_CODE LOCATION_NAME FROM CODE_LOCATION A WHERE A.PLINE_CODE='" + sss1 + "' "
                  + " AND NOT EXISTS(SELECT * FROM REL_STATION_LOCATION C WHERE C.LOCATION_CODE=A.RMES_ID   and c.station_code='" + sss3 + "' ) " //and c.LOCATION_FLAG='B'
                  + " ORDER BY A.LOCATION_CODE";
        }
        //如果是查看工位显示所有工位
        DataTable dt = dc.GetTable(sql);

        location.DataSource = dt;
        location.DataBind();
    }
Ejemplo n.º 4
0
        //初始化JHDM
        //private void initJHDM()
        //{
        //    string sql = " select distinct b.PLAN_CODE||'--'||b.PLAN_SO AS PLAN_CODE,b.PLAN_SEQ,  b.PLAN_QTY,b.BEGIN_DATE from DATA_PLAN b "
        //        + " where b.BEGIN_DATE>=to_date('" + DTPicker1.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') and b.BEGIN_DATE<=to_date('" + DTPicker2.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') "
        //        + " AND  B.PLINE_CODE = rh_get_data('G','" + txtPCode.Text.Trim() + "','','','') ";
        //    //string sql = " select distinct b.PLAN_CODE, b.PLAN_SO ,b.PLAN_SEQ,  b.PLAN_QTY,b.BEGIN_DATE from DATA_PLAN b WHERE "
        //    //    + " b.BEGIN_DATE>=to_date('" + DTPicker1.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') and b.BEGIN_DATE<=to_date('" + DTPicker2.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') AND "
        //    //    + " B.PLINE_CODE in(select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') ";
        //    if (txtSO.Text.Trim() != "")
        //    {
        //        sql += " AND b.PLAN_SO = '" + txtSO.Text.Trim() + "' ";
        //    }
        //    sql += " ORDER BY PLAN_CODE ";

        //    //sqlJhdm.SelectCommand = sql;
        //    //sqlJhdm.DataBind();

        //    DataTable dt = dc.GetTable(sql);
        //    listJhdm.DataSource = dt;
        //    listJhdm.DataBind();
        //}
        //使用callback初始化JHDM
        protected void listJhdm_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxListBox jhdmList = sender as ASPxListBox;

            string sql = " select distinct b.PLAN_CODE||'--'||b.PLAN_SO AS PLAN_CODE,b.PLAN_SEQ,  b.PLAN_QTY,b.BEGIN_DATE from DATA_PLAN b "
                         + " where b.BEGIN_DATE>=to_date('" + DTPicker1.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') and b.BEGIN_DATE<=to_date('" + DTPicker2.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') ";

            if (txtPCode.Text.Trim() != "")
            {
                sql += " AND b.PLINE_CODE = '" + txtPCode.Value.ToString() + "' ";
            }
            //string sql = " select distinct b.PLAN_CODE, b.PLAN_SO ,b.PLAN_SEQ,  b.PLAN_QTY,b.BEGIN_DATE from DATA_PLAN b WHERE "
            //    + " b.BEGIN_DATE>=to_date('" + DTPicker1.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') and b.BEGIN_DATE<=to_date('" + DTPicker2.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') AND "
            //    + " B.PLINE_CODE in(select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') ";
            if (txtSO.Text.Trim() != "")
            {
                sql += " AND b.PLAN_SO = UPPER('" + txtSO.Text.Trim() + "') ";
            }
            sql += " ORDER BY PLAN_CODE ";

            //sqlJhdm.SelectCommand = sql;
            //sqlJhdm.DataBind();

            DataTable dt = dc.GetTable(sql);

            jhdmList.DataSource = dt;
            jhdmList.DataBind();
        }
Ejemplo n.º 5
0
    public static ASPxListBox MontaListMult(ASPxListBox pCombo, string pTabela, string[] pCamposExibe, string pCampoValor, Boolean pExibeValor)
    {
        //Documentação - Chamada da Função
        //
        //String[] Campos = { "tipo", "descricao", "apelido" };
        //RgbDbLib.MontaListMult(ListBoxModelo2, "tcobran", Campos, "tipo", true);
        //
        //O Search será sempre pelo 1o. campo do Select
        //O Campo de valor Não precisa ser passado na lista de campos, porque ele vem através de pCampoValor
        //Fim Documentação - Chamada da Função

        String script = "SELECT ";

        foreach (String item in pCamposExibe)
        {
            script = script + item + ",";
        }
        script = script + pCampoValor + " FROM " + pTabela + " WITH(NOLOCK)";
        DataSet ds = SreDblib.GetDsScript(script);

        pCombo.DataSource = ds;
        pCombo.ValueField = pCampoValor;
        pCombo.DataBind();

        return(pCombo);
    }
Ejemplo n.º 6
0
        protected void lbAvailable_callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxListBox lstBox = sender as ASPxListBox;

            DataSet ds = SqlHelper.ExecuteDataset(strconn, "[HRM_GET_KHOADAOTAO]", e.Parameter, 1, 1);

            lstBox.DataSource = ds.Tables[0];
            lstBox.TextField  = "hoten";
            lstBox.ValueField = "id";
            lstBox.DataBind();
        }
Ejemplo n.º 7
0
        protected void UsedByServersListoBox_OnDataBinding(object sender, EventArgs e)
        {
            ASPxListBox lb = (ASPxListBox)sender;
            DataTable   dt = VSWebBL.ConfiguratorBL.TravelerBL.Ins.GetTravelerTestWhenScan();


            lb.DataSource = dt;
            lb.TextField  = "TestScanServer";
            lb.ValueField = "TestScanServer";
            lb.DataBind();
        }
Ejemplo n.º 8
0
        protected void lbAvailable_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string      pline      = e.Parameter;
            ASPxListBox detectData = sender as ASPxListBox;

            string sql = "SELECT A.RMES_ID,A.DETECT_CODE,A.DETECT_CODE||';'||A.DETECT_NAME DETECT_NAME FROM CODE_DETECT A WHERE A.PLINE_CODE='"
                         + pline + "' AND NOT EXISTS(SELECT * FROM REL_STATION_DETECT C WHERE C.DETECT_CODE=A.DETECT_CODE )  ORDER BY A.DETECT_CODE";//
            DataTable dt = dc.GetTable(sql);

            detectData.DataSource = dt;
            detectData.DataBind();
        }
Ejemplo n.º 9
0
 public static void SetDataSource(ASPxListBox lst, object src, string valField, string txtField)
 {
     if (src == null)
     {
         return;
     }
     lst.DataSource = src;
     lst.ValueField = valField;
     lst.TextField  = txtField;
     lst.DataBind();
     GC.Collect();
 }
Ejemplo n.º 10
0
        //工位初始化callback
        protected void listLocationTH_Callback(object sender, CallbackEventArgsBase e)
        {
            string plineNew = e.Parameter;

            string    sql = "select RMES_ID,LOCATION_NAME,LOCATION_CODE from CODE_LOCATION where PLINE_CODE='" + plineNew + "' order by LOCATION_CODE";
            DataTable dt  = dc.GetTable(sql);

            ASPxListBox location = sender as ASPxListBox;

            location.DataSource = dt;
            location.DataBind();
        }
Ejemplo n.º 11
0
        //protected void ProdCategory_Combo_Init(object sender, EventArgs e)
        //{
        //    ASPxComboBox combo = sender as ASPxComboBox;
        //    combo.DataSource = MRPClass.ProCategoryTable();

        //    ListBoxColumn l_value = new ListBoxColumn();
        //    l_value.FieldName = "NAME";
        //    l_value.Caption = "CODE";
        //    l_value.Width = 100;
        //    combo.Columns.Add(l_value);

        //    ListBoxColumn l_text = new ListBoxColumn();
        //    l_text.FieldName = "DESCRIPTION";
        //    l_text.Width = 350;
        //    combo.Columns.Add(l_text);

        //    combo.ValueField = "NAME";
        //    combo.TextField = "DESCRIPTION";
        //    combo.DataBind();
        //    combo.TextFormatString = "{1}";
        //}

        private void ProdCat_DataBind()
        {
            ASPxListBox list = ProdCat_ListBox as ASPxListBox;

            list.Columns.Clear();
            list.Items.Clear();

            string monthyear = MonthYear_Combo.Text;

            //if (!string.IsNullOrEmpty(monthyear) && ((MOPNum_Combo.Value != null) || (CheckboxAll.Checked)))
            //if ((!string.IsNullOrEmpty(monthyear) && MOPNum_Combo.Value != null) || (!string.IsNullOrEmpty(monthyear) && CheckboxAll.Checked))
            if (!string.IsNullOrEmpty(monthyear))
            {
                if (!string.IsNullOrEmpty(MOPNum_Combo.Text.ToString()) || CheckboxAll.Checked)
                {
                    string[] strarr     = monthyear.Split(' ');
                    string   month      = strarr[0].ToString();
                    string   year       = strarr[1].ToString();
                    string   docnum     = "";
                    int      monthindex = Convertion.MONTH_TO_INDEX(month);
                    if (!string.IsNullOrEmpty(MOPNum_Combo.Text.ToString()))
                    {
                        docnum = MOPNum_Combo.Text.ToString();
                    }

                    //MRPClass.PrintString("pass");

                    //MRPClass.PrintString(docnum);

                    list.DataSource = MRPClass.ProCategoryTable_Filter_SelectItemPO(Convert.ToInt32(year), monthindex, docnum);


                    ListBoxColumn l_value = new ListBoxColumn();
                    l_value.FieldName = "NAME";
                    l_value.Caption   = "Code";
                    l_value.Width     = 100;
                    list.Columns.Add(l_value);

                    ListBoxColumn l_text = new ListBoxColumn();
                    l_text.FieldName = "DESCRIPTION";
                    l_text.Caption   = "Description";
                    l_text.Width     = 350;
                    list.Columns.Add(l_text);

                    list.ValueField = "NAME";
                    list.TextField  = "DESCRIPTION";
                    list.DataBind();
                    list.ItemStyle.Wrap = DevExpress.Utils.DefaultBoolean.True;
                    list.ClientEnabled  = true;
                }
            }
        }
Ejemplo n.º 12
0
    public void BindPowerLevel()
    {
        DataSet     dsPowerLevel  = Astronergy.MES.Report.DataAccess.WareHouse.WareHouseDate.GetPowerLever("", "", "");
        ASPxListBox lstPowerLevel = this.ddePowerLevel.FindControl("lstPowerLevel") as ASPxListBox;

        if (lstPowerLevel != null)
        {
            lstPowerLevel.DataSource = dsPowerLevel.Tables[0];
            lstPowerLevel.TextField  = "PMAXSTAB";
            lstPowerLevel.ValueField = "PMAXSTAB";
            lstPowerLevel.DataBind();
            lstPowerLevel.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        }
    }
Ejemplo n.º 13
0
    /// <summary>
    /// 绑定线别
    /// </summary>
    private void BindLine()
    {
        DataTable   dtLine = CommonFunction.GetLine();
        ASPxListBox lst    = this.ddLine.FindControl("lstLine") as ASPxListBox;

        if (lst != null)
        {
            lst.DataSource = dtLine;
            lst.TextField  = "LINE_NAME";
            lst.ValueField = "LINE_NAME";
            lst.DataBind();
            lst.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        }
    }
Ejemplo n.º 14
0
    public void BindProMode()
    {
        DataSet     dsProMode = CTMReportFunction.GetProMode("");
        ASPxListBox lst       = this.ddeProMode.FindControl("lstProMode") as ASPxListBox;

        if (lst != null)
        {
            lst.DataSource = dsProMode.Tables[0];
            lst.TextField  = "PROMODEL_NAME";
            lst.ValueField = "PROMODEL_NAME";
            lst.DataBind();
            lst.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        }
    }
Ejemplo n.º 15
0
        protected void listBoxLSH1_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string[] param = e.Parameter.Split(',');
            //string pline1 = param[0];
            string pline1 = ASPxComboBoxPline.SelectedItem.Value.ToString();
            //string begindate1 = param[1] ;
            string      begindate1 = ASPxDateEdit1.Date.ToString("yyyy-MM-dd");
            string      sql        = "select rmes_id,plan_code,plan_so,plan_qty,pline_code from data_plan where pline_code='" + pline1 + "' and begin_date=to_date('" + begindate1 + "','yyyy-mm-dd') and (plan_type='C' or plan_type='D') and confirm_flag='Y' and bom_flag='N' and item_flag='N' and third_flag='N' and run_flag='N' order by plan_code";
            ASPxListBox location   = sender as ASPxListBox;
            DataTable   dt         = dc.GetTable(sql);

            location.DataSource = dt;
            location.DataBind();
        }
Ejemplo n.º 16
0
    protected void listBoxProgram_Callback(object sender, CallbackEventArgsBase e)
    {
        string user = e.Parameter;

        string    sql = "select a.program_code,b.program_name from vw_user_role_program a left join code_program b on a.program_code=b.program_code where user_id='" + user + "' ORDER BY PROGRAM_CODE ";
        DataTable dt  = dc.GetTable(sql);

        ASPxListBox program = sender as ASPxListBox;

        program.DataSource = dt;
        program.ValueField = "PROGRAM_CODE";
        program.TextField  = "PROGRAM_NAME";
        program.DataBind();
    }
Ejemplo n.º 17
0
    protected void listBoxPreStation_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
    {
        string pline = e.Parameter;

        ASPxListBox preStation = sender as ASPxListBox;

        string sql = "SELECT A.RMES_ID,A.STATION_CODE,A.STATION_NAME STATION_NAME FROM CODE_STATION A WHERE A.PLINE_CODE='" + pline + "'  "
                     + " ORDER BY A.STATION_NAME";

        DataTable dt = dc.GetTable(sql);

        preStation.DataSource = dt;
        preStation.DataBind();
    }
Ejemplo n.º 18
0
    /// <summary>
    /// 绑定客户类别。
    /// </summary>
    private void BindCustomerType()
    {
        DataTable   dtCustomerType = CommonFunction.GetCustomerType();
        ASPxListBox lst            = this.ddeCustomerType.FindControl("lstCustomerType") as ASPxListBox;

        if (lst != null)
        {
            lst.DataSource = dtCustomerType;
            lst.TextField  = "CUSTOMER_TYPE";
            lst.ValueField = "CUSTOMER_TYPE";
            lst.DataBind();
            lst.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        }
    }
Ejemplo n.º 19
0
    private void BindProvidername()
    {
        DataSet     ds = new DataSet();
        ASPxListBox lstProviderName = (ASPxListBox)this.ddleProviderName.FindControl("lstProviderName");

        ds = loadProvidername(companyId);
        lstProviderName.TextField  = "DESCRIPTION";
        lstProviderName.ValueField = "CODE";
        lstProviderName.DataSource = ds;
        lstProviderName.DataBind();
        DevExpress.Web.ListEditItem Item = new DevExpress.Web.ListEditItem("---Select All---", "NA");
        lstProviderName.Items.Insert(0, Item);
        //lstProviderName.SelectedIndex = 0;
    }
Ejemplo n.º 20
0
    private void BindCaseType()
    {
        DataSet ds = new DataSet();

        ds = loadcaseType(companyId);
        ASPxListBox lstCaseType = (ASPxListBox)this.ddleCaseType.FindControl("lstCaseType");

        lstCaseType.ValueField = "CODE";
        lstCaseType.TextField  = "DESCRIPTION";
        lstCaseType.DataSource = ds;
        lstCaseType.DataBind();
        DevExpress.Web.ListEditItem Item = new DevExpress.Web.ListEditItem("---Select All ---", "NA");
        lstCaseType.Items.Insert(0, Item);
    }
Ejemplo n.º 21
0
    private void BindCarrier()
    {
        DataSet     ds         = new DataSet();
        ASPxListBox lstCarrier = (ASPxListBox)this.ddleCarrier.FindControl("lstCarrier");

        ds = loadCarrier(companyId);
        lstCarrier.TextField  = "DESCRIPTION";
        lstCarrier.ValueField = "CODE";
        lstCarrier.DataSource = ds;
        lstCarrier.DataBind();
        DevExpress.Web.ListEditItem Item = new DevExpress.Web.ListEditItem("---Select All---", "NA");
        lstCarrier.Items.Insert(0, Item);
        //lstCarrier.SelectedIndex = 0;
    }
Ejemplo n.º 22
0
    private void BindSpeciality()
    {
        DataSet     ds            = new DataSet();
        ASPxListBox lstSpeciality = (ASPxListBox)this.ddleSpeciality.FindControl("lstSpeciality");

        ds = loadSpeciality(companyId);
        lstSpeciality.TextField  = "description";
        lstSpeciality.ValueField = "code";
        lstSpeciality.DataSource = ds;
        lstSpeciality.DataBind();
        DevExpress.Web.ListEditItem Item = new DevExpress.Web.ListEditItem("---Select All---", "NA");
        lstSpeciality.Items.Insert(0, Item);
        //lstSpeciality.SelectedIndex = 0;
    }
Ejemplo n.º 23
0
    /// <summary>
    /// 产品ID号
    /// </summary>
    private void BindProductModel()
    {
        DataTable   dtProduct = CommonFunction.GetProId();
        ASPxListBox lst       = this.ddeProductId.FindControl("lstProductId") as ASPxListBox;

        if (lst != null)
        {
            lst.DataSource = dtProduct;
            lst.TextField  = "PRODUCT_CODE";
            lst.ValueField = "PRODUCT_CODE";
            lst.DataBind();
            lst.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        }
    }
Ejemplo n.º 24
0
    protected void ASPxListBox1_Callback(object sender, CallbackEventArgsBase e)
    {
        ASPxListBox location = sender as ASPxListBox;
        string      pline    = e.Parameter;
        string      sql      = "";

        sql = "select A.RMES_ID, A.LOCATION_CODE, A.LOCATION_CODE LOCATION_NAME from code_location a where pline_code = '" + pline + "' and not exists(select * from vw_rel_station_location b where b.pline_id = '" + pline + "' "
              + " and b.location_flag = 'A' and a.location_code=b.location_code and a.pline_code=b.pline_id ) ORDER BY A.LOCATION_CODE ";

        DataTable dt = dc.GetTable(sql);

        location.DataSource = dt;
        location.DataBind();
    }
Ejemplo n.º 25
0
    private void BindLawfirm()
    {
        DataSet ds = new DataSet();

        ds = loadLawfirm();
        ASPxListBox lstLawfirm = (ASPxListBox)this.ddleLawfirm.FindControl("lstLawfirm");

        lstLawfirm.ValueField = "CODE";
        lstLawfirm.TextField  = "DESCRIPTION";
        lstLawfirm.DataSource = ds;
        lstLawfirm.DataBind();
        DevExpress.Web.ListEditItem Item = new DevExpress.Web.ListEditItem("---Select All---", "NA");
        lstLawfirm.Items.Insert(0, Item);
        //lstLawfirm.SelectedIndex = 0;
    }
Ejemplo n.º 26
0
    protected void listBoxUser_Callback(object sender, CallbackEventArgsBase e)
    {
        string pline = e.Parameter;

        ASPxListBox listUser = sender as ASPxListBox;

        string sql = "SELECT A.USER_ID,A.USER_CODE,A.USER_CODE||';'||A.USER_NAME USER_NAME FROM CODE_USER A "
                     + " WHERE NOT EXISTS(SELECT * FROM REL_STATION_USER C WHERE C.user_id=A.user_id   )  and user_type='B' "
                     + " ORDER BY A.USER_CODE";

        DataTable dt = dc.GetTable(sql);

        listUser.DataSource = dt;
        listUser.DataBind();
    }
Ejemplo n.º 27
0
        //初始化JHDM
        //private void initJHDM()
        //{
        //    string sql = " select distinct b.PLAN_CODE||'--'||b.PLAN_SO AS PLAN_CODE,b.PLAN_SEQ,  b.PLAN_QTY,b.BEGIN_DATE from DATA_PLAN b "
        //        + " where b.BEGIN_DATE>=to_date('" + DTPicker1.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') and b.BEGIN_DATE<=to_date('" + DTPicker2.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') "
        //        + " AND  B.PLINE_CODE = rh_get_data('G','" + txtPCode.Text.Trim() + "','','','') ";
        //    //string sql = " select distinct b.PLAN_CODE, b.PLAN_SO ,b.PLAN_SEQ,  b.PLAN_QTY,b.BEGIN_DATE from DATA_PLAN b WHERE "
        //    //    + " b.BEGIN_DATE>=to_date('" + DTPicker1.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') and b.BEGIN_DATE<=to_date('" + DTPicker2.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') AND "
        //    //    + " B.PLINE_CODE in(select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') ";
        //    if (txtSO.Text.Trim() != "")
        //    {
        //        sql += " AND b.PLAN_SO = '" + txtSO.Text.Trim() + "' ";
        //    }
        //    sql += " ORDER BY PLAN_CODE ";

        //    //sqlJhdm.SelectCommand = sql;
        //    //sqlJhdm.DataBind();

        //    DataTable dt = dc.GetTable(sql);
        //    listJhdm.DataSource = dt;
        //    listJhdm.DataBind();
        //}
        //使用callback初始化JHDM
        protected void listJhdm_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string flag = e.Parameter.ToString();

            if (flag == "查询计划")
            {
                //重新查询计划时要把已选的计划号列表清空一下
                List1.Items.Clear();

                ASPxListBox jhdmList = sender as ASPxListBox;

                string sql = " select distinct b.PLAN_CODE||'--'||b.PLAN_SO AS PLAN_CODE,b.PLAN_SEQ,  b.PLAN_QTY,b.BEGIN_DATE from DATA_PLAN b "
                             + " where b.BEGIN_DATE>=to_date('" + DTPicker1.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') and b.BEGIN_DATE<=to_date('" + DTPicker2.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') ";
                if (txtPCode.Text.Trim() != "")
                {
                    sql += " AND b.PLINE_CODE = '" + txtPCode.Value.ToString() + "' ";
                }
                //string sql = " select distinct b.PLAN_CODE, b.PLAN_SO ,b.PLAN_SEQ,  b.PLAN_QTY,b.BEGIN_DATE from DATA_PLAN b WHERE "
                //    + " b.BEGIN_DATE>=to_date('" + DTPicker1.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') and b.BEGIN_DATE<=to_date('" + DTPicker2.Date.ToString("yyyy/MM/dd") + "','yyyy-MM-dd') AND "
                //    + " B.PLINE_CODE in(select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') ";
                if (txtSO.Text.Trim() != "")
                {
                    sql += " AND b.PLAN_SO = UPPER('" + txtSO.Text.Trim() + "') ";
                }
                sql += " ORDER BY PLAN_CODE ";

                //sqlJhdm.SelectCommand = sql;
                //sqlJhdm.DataBind();

                DataTable dt = dc.GetTable(sql);
                jhdmList.DataSource = dt;
                jhdmList.DataBind();
            }
            if (flag == "增加")
            {
                //DataTable dt = new DataTable();
                //dt.Columns.Add("PLAN_CODE");
                //if (listJhdm.Items.Count != 0 && listJhdm.Items != null)
                //{
                //    for (int i = 0; i < listJhdm.Items.Count; i++)
                //    {
                //        dt.Rows.Add(listJhdm.Items[i].ToString());
                //    }
                //}
                //listJhdm.DataSource = dt;
                //listJhdm.DataBind();
            }
        }
Ejemplo n.º 28
0
    /// <summary>
    /// 绑定工单
    /// </summary>
    public void BindWorkOrderNumber(string roomKey)
    {
        if (roomKey == "ALL")
        {
            roomKey = string.Empty;
        }
        DataTable   dtWorkOrderNo = CommonFunction.GetLotWorkOrderNumber(roomKey);
        ASPxListBox lst           = this.ddeWorkOrderNumber.FindControl("lstWorkOrderNumber") as ASPxListBox;

        if (lst != null)
        {
            lst.DataSource = dtWorkOrderNo;
            lst.TextField  = "WORK_ORDER_NO";
            lst.ValueField = "WORK_ORDER_NO";
            lst.DataBind();
            lst.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        }
    }
Ejemplo n.º 29
0
    private void BindLine()
    {
        //DataTable dtLine = CommonFunction.GetLine();
        //this.cmbLine.DataSource = dtLine;
        //this.cmbLine.DataBind();
        //this.cmbLine.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        //this.cmbLine.SelectedIndex = 0;
        DataTable   dtLine = CommonFunction.GetLine();
        ASPxListBox lstWO  = this.ddeWO.FindControl("lstWO") as ASPxListBox;

        if (lstWO != null)
        {
            lstWO.DataSource = dtLine;
            lstWO.TextField  = "LINE_NAME";
            lstWO.ValueField = "LINE_NAME";
            lstWO.DataBind();
            lstWO.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        }
    }
Ejemplo n.º 30
0
    public void BindWO()
    {
        DataSet dsWO = CTMFunction.GetWO();
        //cobWO.DataSource = dsWO.Tables[0];
        //cobWO.TextField = "ORDER_NUMBER";
        //cobWO.ValueField = "ORDER_NUMBER";
        //cobWO.DataBind();
        //cobWO.Items.Insert(0,new ListEditItem("ALL","ALL"));
        //cobWO.SelectedIndex = 0;

        ASPxListBox lstWO = this.ddeWO.FindControl("lstWO") as ASPxListBox;

        if (lstWO != null)
        {
            lstWO.DataSource = dsWO.Tables[0];
            lstWO.TextField  = "ORDER_NUMBER";
            lstWO.ValueField = "ORDER_NUMBER";
            lstWO.DataBind();
            lstWO.Items.Insert(0, new ListEditItem("ALL", "ALL"));
        }
    }