Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theProgramCode = "ssd1200";
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit2.Date = DateTime.Now;
                List <ProductLineEntity> user_plines = ProductLineFactory.GetByUserID(theUserManager.getUserId(), theProgramCode);
                ASPxComboBoxPline.DataSource = user_plines;
                ASPxComboBoxPline.TextField  = "PLINE_NAME";
                ASPxComboBoxPline.ValueField = "PLINE_CODE";
                ASPxComboBoxPline.DataBind();
            }

            setCondition();
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            programcode    = "ssd2101";
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                List <ProductLineEntity> user_plines = ProductLineFactory.GetByUserID(theUserManager.getUserId(), programcode);
                ASPxComboBoxPline.DataSource = user_plines;
                ASPxComboBoxPline.TextField  = "PLINE_NAME";
                ASPxComboBoxPline.ValueField = "PLINE_CODE";
                ASPxComboBoxPline.DataBind();
                ASPxComboBoxPline.SelectedIndex = 0;
            }
            //string sql1 = "select rmes_id,plan_code,plan_so,plan_qty,pline_code from data_plan where pline_code='" + ASPxComboBoxPline.SelectedItem.Value.ToString() + "' and begin_date=to_date('" + ASPxDateEdit1.Date.ToString("yyyy-MM-dd") + "','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();
            setCondition();
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {

            userManager theUserManager = (userManager)Session["theUserManager"];
            theCompanyCode = theUserManager.getCompanyCode();
            theUserId = theUserManager.getUserId();
            programcode = "ssd1041";
            if (!IsPostBack)
            {


                List<ProductLineEntity> user_plines = ProductLineFactory.GetByUserID(theUserManager.getUserId(), programcode);
                ASPxComboBoxPline.DataSource = user_plines;
                ASPxComboBoxPline.TextField = "PLINE_NAME";
                ASPxComboBoxPline.ValueField = "PLINE_CODE";
                ASPxComboBoxPline.DataBind();
                ASPxComboBoxPline.SelectedIndex = 0;

                List<ProductLineEntity> plines = ProductLineFactory.GetAll();
                ASPxComboBoxProcess.DataSource = plines;
                ASPxComboBoxProcess.TextField = "PLINE_NAME";
                ASPxComboBoxProcess.ValueField = "PLINE_CODE";
                ASPxComboBoxProcess.DataBind();
                ASPxComboBoxProcess.Value = ASPxComboBoxPline.Value;

                //string sql = "select ALINE_CODE,ALINE_NAME from atpu_acrossline";
                //dc.setTheSql(sql);
                //ASPxComboBoxAcross.DataSource = dc.GetTable();
                //ASPxComboBoxAcross.TextField = "ALINE_NAME";
                //ASPxComboBoxAcross.ValueField = "ALINE_CODE";
                //ASPxComboBoxAcross.DataBind();
                //ASPxComboBoxAcross.SelectedIndex = 0;

                string sql = "select * from code_station t left join code_station_type a on t.station_type=a.station_type_code where a.station_type_name like '%拆解%' and t.pline_code in (select pline_code from rel_user_pline where user_id='" + theUserManager.getUserId() + "')  ";
                dc.setTheSql(sql);
                CJZD.DataSource = dc.GetTable();
                CJZD.TextField = "STATION_NAME";
                CJZD.ValueField = "STATION_TYPE";
                CJZD.DataBind();
                CJZD.SelectedIndex = 0;

                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit2.Date = DateTime.Now.AddDays(5);
                ASPxBeginDate.Date = DateTime.Now;
                ASPxEndDate.Date = DateTime.Now.AddDays(5);


            }


            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "";
                string so = Request["SO"].ToString();
                string sql = "select jx,config from copy_engine_property where SO='" + so.ToUpper() + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string config1 = dc.GetTable().Rows[0][1].ToString();
                string jx1 = dc.GetTable().Rows[0][0].ToString();
                if (jx1 == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                if (jx1.EndsWith("ZZ"))
                {
                    jx1 = jx1.Substring(0, jx1.Length - 2);
                }
                str1 = jx1;
                sql = "select GET_CSKD('" + so + "') from dual";
                dc.setTheSql(sql);
                string bz1 = dc.GetValue().ToString();
                str1 = str1 + "," + bz1;
                this.Response.Write(str1);
                this.Response.End();
            }
            string plineSql = "SELECT a.PLINE_CODE,a.PLINE_NAME FROM CODE_PRODUCT_LINE a left join rel_user_pline b on a.rmes_id=b.PLINE_CODE "
                   + " WHERE a.COMPANY_CODE='" + theCompanyCode + "' AND b.USER_ID='" + theUserId + "' order by a.pline_code";
            SqlDataSource1.SelectCommand = plineSql;
            SqlDataSource1.DataBind();

            string plineSql1 = "SELECT ALINE_CODE,ALINE_NAME FROM atpu_acrossline ";
            SqlDataSource2.SelectCommand = plineSql1;
            SqlDataSource2.DataBind();

            string plineSql2 = "select * from code_station t left join code_station_type a on t.station_type=a.station_type_code where a.station_type_name like '%拆解%' and t.pline_code in (select pline_code from rel_user_pline where user_id='" + theUserManager.getUserId() + "')  ";
            SqlDataSource3.SelectCommand = plineSql2;
            SqlDataSource3.DataBind();

            setCondition();
        }