Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            theProgramCode = "rept3300";
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            //test
            //theUserCode = "ZZ098";

            if (!IsPostBack)
            {
            }

            initPlineCode();
            setCondition();

            System.Data.DataTable dt;

            if (Request["opFlag"] == "getEditSeries")
            {
                string result    = "";
                string sn        = Request["SN"].ToString().Trim();
                string plineCode = Request["PLINE_CODE"].ToString().Trim();

                string sql = "select SN,PLAN_CODE,PLAN_SO,PLINE_CODE from VW_DATA_PRODUCT where SN = '" + sn + "' "
                             //+ " and ZDMC='管理' "
                             //只有返修改制计划的流水号才可以
                             + " and PLAN_CODE in (select PLAN_CODE from DATA_PLAN where ( PLAN_TYPE = 'C' OR PLAN_TYPE = 'D') AND PLINE_CODE='" + plineCode + "')";
                dt = dc.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    //??或者是取不到list里的数据,或者是已被清空,待测试 前端是用ClientInstanceName取,后台用ID?
                    for (int i = 0; i < listLsh.Items.Count; i++)
                    {
                        //根据“&”分割出SN
                        string[] str = listLsh.Items[i].ToString().Trim().Split("&".ToCharArray());
                        if (sn == str[0])
                        {
                            //为1时前端显示“流水号已录入!”
                            result = "1";
                        }
                    }
                    sn = dt.Rows[0][0].ToString();
                    string planCode   = dt.Rows[0][1].ToString().Trim();
                    string planSO     = dt.Rows[0][2].ToString().Trim();
                    string plineCode1 = dt.Rows[0][3].ToString();
                    result = sn + "&" + planCode + "&" + planSO + "&" + plineCode1;
                }
                else
                {
                    //为0时前端显示“流水号不存在!”
                    result = "0";
                }

                this.Response.Write(result);
                this.Response.End();
            }
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "part1900";
            initCode();
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "", whyh = "", whsj = "";

                string pcode = Request["Pcode"].ToString().Trim();
                if (pcode != "")
                {
                    string    sql3 = "select nvl(whyh,' '),nvl(to_char(whsj,'yyyy-mm-dd hh24:mi:ss'),' ') from ms_skip_password where gzdd='" + pcode + "' ";
                    DataTable dt3  = dc.GetTable(sql3);
                    if (dt3.Rows.Count > 0)
                    {
                        whyh = dt3.Rows[0][0].ToString();
                        whsj = dt3.Rows[0][1].ToString();
                        //txtWHYH.Text = whyh;
                        //txtWHSJ.Text = whsj;
                    }
                }
                str1 = whyh + "," + whsj;
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();

        theProgramCode = "part2700";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        theUserName    = theUserManager.getUserName();

        //初始查询条件生产线
        string Sql = " select distinct a.pline_code,b.pline_name as showtext from vw_user_role_program a left join code_product_line b on a.pline_code=b.pline_code where a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' and a.company_code='" + theCompanyCode + "' ";

        comPLQ.DataSource = dc.GetTable(Sql);
        comPLQ.DataBind();

        //初始查询条件状态
        string SqlStatus = " select internal_code,internal_name from code_internal where internal_type_code='013' order by internal_code";

        comboStatusQ.DataSource = dc.GetTable(SqlStatus);
        comboStatusQ.DataBind();

        setCondition();

        if (!IsPostBack)
        {
            //comPLQ.SelectedIndex = comPLQ.Items.Count >= 0 ? 0 : -1;//
            StartDateQ.Date = DateTime.Now.AddDays(-1);
            EndDateQ.Date   = DateTime.Now.AddDays(1);
        }
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theDisplayProgramName = theUserManager.getProgName();
        theDisplayPlineName   = theUserManager.getPlineName();
        theDisplayUserName    = theUserManager.getUserName();
        theDisplayCompanyCode = theUserManager.getCompanyCode();
        theDisplayProgramCode = theUserManager.getProgCode();
        theProgValue          = theUserManager.getProgVlaue();
        string theMenuCompanyCode = theUserManager.getCompanyCode();

        theMenuUserCode = theUserManager.getUserCode();

        Response.Cookies["CurrentProgramCode"].Value = theDisplayProgramCode;

        ////打印
        //thePrintSql = (string)Session["thePrintSql"];


        //显示提示信息  20071219
        //string str = theDisplayPlineName + "-->" + theDisplayUserName + "___" + theDisplayProgramName;
        //Response.Write("<script>window.status='" + str + "';</script>");

        //theHelpFile = theUrlTemp + "/Rmes/Help/" + theDisplayProgramCode + ".htm";

        //考虑以后可能对程序内容做一些处理,暂且定义变量
        //string theProgTemp = "";
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();

        string hostIPAddress = Page.Request.UserHostAddress;

        //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
        GV_MachineName = hostIPAddress;
        //GV_MachineName = System.Net.Dns.GetHostName();

        theProgramCode = "epd3700";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();

        string sql = "select a.pline_code,b.rmes_id,b.pline_name from VW_USER_ROLE_PROGRAM a "
                     + "left join code_product_line b on a.pline_code=b.pline_code "
                     + "where a.COMPANY_CODE = '" + theCompanyCode + "' and a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' order by b.PLINE_NAME";

        comboPlineCode.DataSource = dc.GetTable(sql);
        comboPlineCode.DataBind();

        setCondition();

        if (!IsPostBack)
        {
            string sqlD = "DELETE from REL_STATION_PRESTATION_TEMP";
            dc.ExeSql(sqlD);
        }
    }
Exemple #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        theProgramCode = "part1800";
        initPlanCode();
        initCode();
        initMcode();
        setCondition();
        if (Request["opFlag"] == "getEditSeries")
        {
            string str1 = "", str2 = "";
            string MCode = Request["MCODE"].ToString().Trim();
            string pcode = Request["Pcode"].ToString().Trim();
            if (pcode == "E")
            {
                str2 = "DCEC-B";
            }
            else if (pcode == "W")
            {
                str2 = "DCEC-C";
            }
            else
            {
                str2 = "";
            }
            string sql = "select pt_desc2 from copy_pt_mstr where pt_part='" + MCode + "'";
            dc.setTheSql(sql);
            DataTable dt = dc.GetTable(sql);
            if (dt.Rows.Count == 0)
            {
                str1 = "";
                this.Response.Write(str1);
                this.Response.End();
                return;
            }

            string strMCode = dc.GetTable().Rows[0][0].ToString();
            if (strMCode == "")
            {
                str1 = "";
                this.Response.Write(str1);
                this.Response.End();
                return;
            }
            else
            {
                str1 = strMCode;
            }

            str1 = str1 + "," + str2;
            this.Response.Write(str1);
            this.Response.End();
        }
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        theProgramCode = "part1600";
        //initRLocation();
        initCode();
        setCondition();
        if (Request["opFlag"] == "getEditSeries")
        {
            string str1 = "", str2 = "";
            string RLOCATION = Request["RLOCATION"].ToString().Trim();
            string pcode     = Request["Pcode"].ToString().Trim();
            if (pcode != "R" && pcode != "L")
            {
                str2 = RLOCATION;
            }
            else
            {
                str2 = "";
            }
            if (pcode == "L")
            {
                string    sql    = "select PLINE_CODE from code_product_line where pline_code='E' OR PLINE_CODE='W'";
                DataTable dt     = dc.GetTable(sql);
                string    Rgzdd1 = dt.Rows[0][0].ToString();
                string    Rgzdd2 = dt.Rows[1][0].ToString();
                str1 = str1 + Rgzdd1 + "@" + Rgzdd2;
            }
            else if (pcode != "R")
            {
                string    sql = "select PLINE_CODE  from code_product_line where pline_code ='" + pcode + "'";
                DataTable dt  = dc.GetTable(sql);
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string code1 = dt.Rows[i][0].ToString();
                    //string code2 = dt.Rows[i][1].ToString();
                    str1 = str1 + "@" + code1;
                }
                //str1 = str1 + "@" + pcode;
            }
            else
            {
                string    sql    = "select PLINE_CODE  from code_product_line where pline_code='E'OR PLINE_CODE='W' OR PLINE_CODE='R'";
                DataTable dt     = dc.GetTable(sql);
                string    Rgzdd1 = dt.Rows[0][0].ToString();
                string    Rgzdd2 = dt.Rows[1][0].ToString();
                string    Rgzdd3 = dt.Rows[2][0].ToString();
                str1 = Rgzdd1 + "@" + Rgzdd2 + "@" + Rgzdd3;
            }
            str1 = str1 + "," + str2;
            this.Response.Write(str1);
            this.Response.End();
        }
    }
Exemple #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserCode    = theUserManager.getUserCode();

        setCondition();
    }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserCode    = theUserManager.getUserCode();
        theUserId      = theUserManager.getUserId();
        theUserName    = theUserManager.getUserName();
        theProgramCode = "inv9900";
        if (!IsPostBack)
        {
            ASPxDateEdit1.Date = DateTime.Now;
            ASPxDateEdit2.Date = DateTime.Now.AddDays(1);
        }
        initCode();
        initYG();
        initFrom();
        setCondition();
        //if (Request["opFlag"] == "getBatch")
        //{
        //    string str1 = "", str2 = "", str = "", rc = "", str3 = "";
        //    string DateEdit1 = Request["DATEEDIT1"].ToString().Trim();
        //    string DateEdit2 = Request["DATEEDIT2"].ToString().Trim();
        //    string Chose = Request["CHOSE"].ToString().Trim();
        //    string PCode = Request["PCODE"].ToString().Trim();
        //    //Server.UrlDecode(request.form["a"].ToString())
        //    DateTime dt1 = Convert.ToDateTime(DateEdit1);
        //    DateTime dt2 = Convert.ToDateTime(DateEdit2);

        //    dt1.AddDays(30);
        //    if (Chose == "RK") { rc = "入库"; }
        //    else { rc = "出库"; }

        //    if (dt1.AddDays(30) < dt2)
        //    {
        //        str1 = "Overtime";

        //    }
        //    else
        //    {
        //        str1 = "ok";
        //        string sql = "select distinct gzrq from dp_rckwcb where  to_date(gzrq,'yyyy-mm-dd hh24:mi:ss')>= to_date('" + DateEdit1 + "', 'yyyy-mm-dd hh24:mi:ss')  and  to_date(gzrq,'yyyy-mm-dd hh24:mi:ss')<= to_date('" + DateEdit2 + "', 'yyyy-mm-dd hh24:mi:ss') AND GZDD='" + PCode + "' and Rc='" + rc + "' order by Gzrq";
        //        DataTable dt = dc.GetTable(sql);
        //        for (int i = 0; i < dt.Rows.Count; i++)
        //        {
        //            string batch = dt.Rows[i][0].ToString();

        //            str2 = str2 + "@" + batch;
        //        }

        //    }

        //    str = str1 + "," + str2 + "," + str3;
        //    this.Response.Write(str);
        //    this.Response.End();
        //}
    }
Exemple #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theusercode    = theUserManager.getUserCode();
        theProgramCode = "ssd3100";
        SetCondition();
    }
Exemple #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "epdQualityAlert";
            setCondition();
        }
Exemple #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theUserName    = theUserManager.getUserName();
            theProgramCode = "inv9400";
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date    = DateTime.Now;
                ASPxDateEdit3.Date    = DateTime.Now.AddDays(1);
                Session["inv9400sql"] = "";
            }
            initCode();
            if (Session["inv9400sql"] as string != "")
            {
                DataTable dt = dc.GetTable(Session["inv9400sql"] as string);
                ASPxGridView1.DataSource = dt;
                ASPxGridView1.DataBind();
            }
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "", str2 = "", str = "", str3 = "";
                string lsh = Request["LSH"].ToString().Trim();
                //string qad = Request["QAD"].ToString().Trim();

                string    sql = "select PLAN_SO,PLAN_CODE from DATA_PRODUCT where SN='" + lsh + "'";
                DataTable dt  = dc.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    str1 = dt.Rows[0][0].ToString();
                    str2 = dt.Rows[0][1].ToString();
                }

                string sql2 = "select t.station_code from data_store t where t.SN='" + lsh + "'";

                DataTable dt2 = dc.GetTable(sql2);
                if (dt2.Rows.Count > 0)
                {
                    str3 = dt2.Rows[0][0].ToString();
                }

                str = str1 + "," + str2 + "," + str3;
                this.Response.Write(str);
                this.Response.End();
            }
            //if (Session["inv9400sql"] as string != "")
            //{
            //    DataTable dt = dc.GetTable(Session["inv99400sql"] as string);
            //    ASPxGridView1.DataSource = dt;
            //    ASPxGridView1.DataBind();
            //}
        }
Exemple #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theProgramCode = "epd3600";
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();

            queryFunction();
        }
Exemple #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        theProgramCode = "part1300";
        initLocation();
        setCondition();
    }
Exemple #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();

        theProgramCode = "part1200";
        OracleSQLTime  = DB.GetInstance().ExecuteScalar <DateTime>("Select sysdate from dual");
        setCondition();
    }
Exemple #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theProgramCode = "atpu1500";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        //初始化新增模版里生产线下拉列表
        initCode();


        setCondition();
    }
Exemple #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();

        if (!IsPostBack)
        {
            //OracleEntityTime = DB.GetServerTime();

            OracleSQLTime = DB.GetInstance().ExecuteScalar <DateTime>("Select sysdate from dual");
        }
        setCondition();
    }
Exemple #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theProgramCode = "qms1300";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();

        string sql = "select RMES_ID PLINE_CODE,PLINE_NAME from code_product_line where pline_code in ( select distinct pline_code from vw_user_role_program t where company_code='" + theCompanyCode + "' and program_code='" + theProgramCode + "' and user_id='" + theUserId + "' )";

        sqlPline.SelectCommand = sql;
        sqlPline.DataBind();

        setCondition();
    }
Exemple #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theProgramCode = "epd3600";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();

        string sql = "select a.pline_code,b.rmes_id,b.pline_name from VW_USER_ROLE_PROGRAM a "
                     + "left join code_product_line b on a.pline_code=b.pline_code "
                     + "where a.COMPANY_CODE = '" + theCompanyCode + "' and a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' order by b.PLINE_NAME";

        comboPlineCode.DataSource = dc.GetTable(sql);
        comboPlineCode.DataBind();
    }
Exemple #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        theProgramCode = "atpu2000";

        setCondition();
        initSO();

        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();
        }
    }
Exemple #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();

        string hostIPAddress = Page.Request.UserHostAddress;

        //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
        GV_MachineName = hostIPAddress;
        //GV_MachineName = System.Net.Dns.GetHostName();

        theProgramCode = "epd3400";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        string sql = "select a.pline_code,b.rmes_id,b.pline_name from VW_USER_ROLE_PROGRAM a "
                     + "left join code_product_line b on a.pline_code=b.pline_code "
                     + "where a.COMPANY_CODE = '" + theCompanyCode + "' and a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' order by b.PLINE_NAME";

        comboPlineCode.DataSource = dc.GetTable(sql);
        comboPlineCode.DataBind();

        SetCondition();

        if (!IsPostBack)
        {
            comboPlineCode.SelectedIndex = 0;
            string    sql23 = "select RMES_ID,STATION_NAME from CODE_STATION where PLINE_CODE='" + comboPlineCode.Value.ToString() + "' order by STATION_NAME";
            DataTable dt    = dc.GetTable(sql23);

            comboStationCode.DataSource = dt;
            comboStationCode.ValueField = "RMES_ID";
            comboStationCode.TextField  = "STATION_NAME";
            comboStationCode.DataBind();

            sql = "select A.RMES_ID, A.LOCATION_CODE, A.LOCATION_CODE LOCATION_NAME from code_location a where pline_code = '" + comboPlineCode.Value.ToString() + "' and not exists(select * from vw_rel_station_location b where b.pline_id = '" + comboPlineCode.Value.ToString() + "' "
                  + " 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 dt1 = dc.GetTable(sql);

            ASPxListBox1.DataSource = dt1;
            ASPxListBox1.DataBind();

            string sqlD = "DELETE from REL_STATION_LOCATION_TEMP";
            dc.ExeSql(sqlD);
        }
    }
Exemple #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theProgramCode = "epd3400";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        string sql = "select a.pline_code,b.rmes_id,b.pline_name from VW_USER_ROLE_PROGRAM a "
                     + "left join code_product_line b on a.pline_code=b.pline_code "
                     + "where a.COMPANY_CODE = '" + theCompanyCode + "' and a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' order by b.PLINE_NAME";

        comboPlineCode.DataSource = dc.GetTable(sql);
        comboPlineCode.DataBind();

        //string sql1 = "select INTERNAL_CODE,INTERNAL_NAME from CODE_INTERNAL where COMPANY_CODE='" + theCompanyCode + "' AND INTERNAL_TYPE_CODE='001' order by INTERNAL_CODE desc";
        //locationPro.DataSource = dc.GetTable(sql1);
        //locationPro.DataBind();

        if (!IsPostBack)
        {
            comboPlineCode.SelectedIndex = 0;
            string    sql23 = "select RMES_ID,STATION_NAME from CODE_STATION where PLINE_CODE='" + comboPlineCode.Value.ToString() + "' order by STATION_NAME";
            DataTable dt    = dc.GetTable(sql23);

            comboStationCode.DataSource = dt;
            comboStationCode.ValueField = "RMES_ID";
            comboStationCode.TextField  = "STATION_NAME";
            comboStationCode.DataBind();

            string sql2 = "SELECT A.RMES_ID,A.LOCATION_CODE,A.LOCATION_CODE LOCATION_NAME FROM CODE_LOCATION A WHERE  location_code not in (select location_code from vw_rel_station_location )  ORDER BY A.LOCATION_CODE";

            DataTable dt2 = dc.GetTable(sql2);
            ASPxListBox1.DataSource = dt2;
            ASPxListBox1.ValueField = "RMES_ID";
            ASPxListBox1.TextField  = "LOCATION_NAME";
            ASPxListBox1.DataBind();

            //sql = "SELECT A.RMES_ID,A.LOCATION_CODE,A.LOCATION_CODE LOCATION_NAME FROM CODE_LOCATION A WHERE  location_code not in (select location_code from vw_rel_station_location where pline_id='" + comboPlineCode.Value.ToString() + "' and location_flag='A' ) and pline_code='" + comboPlineCode.Value.ToString() + "' ORDER BY A.LOCATION_CODE";
            sql = "select A.RMES_ID, A.LOCATION_CODE, A.LOCATION_CODE LOCATION_NAME from code_location a where pline_code = '" + comboPlineCode.Value.ToString() + "' and not exists(select * from vw_rel_station_location b where b.pline_id = '" + comboPlineCode.Value.ToString() + "' "
                  + " and b.location_flag = 'A' and a.location_code=b.location_code and a.pline_code=b.pline_id ) ORDER BY A.LOCATION_CODE";
            dt = dc.GetTable(sql);

            ASPxListBox1.DataSource = dt;
            ASPxListBox1.DataBind();
        }
    }
Exemple #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserCode    = theUserManager.getUserCode();
        theUserId      = theUserManager.getUserId();
        theUserName    = theUserManager.getUserName();
        theProgramCode = "part1700";
        if (!IsPostBack)
        {
            ASPxDateEdit2.Date = DateTime.Now;
            ASPxDateEdit1.Date = DateTime.Now.AddDays(-1);
        }
        initCode();
        setCondition();
    }
Exemple #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "part1400";
            initPlanCode();
            initPlineCode();
            setCondition();
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit3.Date = DateTime.Now.AddDays(1);
            }
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "", str2 = "";
                string pcode    = Request["PCode"].ToString().Trim();
                string plancode = Request["PlanCode"].ToString().Trim();
                string sql      = "select PLAN_SO,PLAN_QTY from data_plan where pline_code='" + pcode.ToUpper() + "' and plan_code='" + plancode.ToUpper() + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string Pqty = dc.GetTable().Rows[0][1].ToString();
                string Pso  = dc.GetTable().Rows[0][0].ToString();
                if (Pso == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = Pso;
                str2 = Pqty;
                str1 = str1 + "," + str2;
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Exemple #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theProgramCode = "epd3900";
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();

            queryFunction();
            setCondition();

            string plineSql = "select a.pline_code,b.rmes_id,b.pline_name from VW_USER_ROLE_PROGRAM a "
                              + "left join code_product_line b on a.pline_code=b.pline_code "
                              + "where a.COMPANY_CODE = '" + theCompanyCode + "' and a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' order by b.PLINE_NAME";

            SqlDataSource1.SelectCommand = plineSql;
            SqlDataSource1.DataBind();
        }
Exemple #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "atpu1B00";

            setCondition();

            string sql2 = "select distinct tjlx from dmtjb order by tjlx";

            SqlDataSource2.SelectCommand = sql2;
            SqlDataSource2.DataBind();
            //SO合法性判断begin
            if (Request["opFlag"] == "getEditSO")
            {
                string str1  = "";
                string strSO = Request["SoC"].ToString();
                string sql   = "SELECT SO FROM copy_engine_property where SO='" + strSO + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string strSO1 = dc.GetTable().Rows[0][0].ToString();
                if (strSO == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = strSO1;
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Exemple #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();

        theProgramCode = "part2800";
        //GV_MachineName = GV_MachineName = System.Net.Dns.GetHostName();
        string hostIPAddress = Page.Request.UserHostAddress;

        //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
        //MachineName = System.Web.HttpContext.Current.Request.UserHostAddress;
        GV_MachineName = hostIPAddress;

        string sql = "select a.pline_code,b.rmes_id,b.pline_name from VW_USER_ROLE_PROGRAM a "
                     + "left join code_product_line b on a.pline_code=b.pline_code "
                     + "where a.COMPANY_CODE = '" + theCompanyCode + "' and a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' order by b.PLINE_NAME";

        comboPlineCode.DataSource = dc.GetTable(sql);
        comboPlineCode.DataBind();

        if (!IsPostBack)
        {
            //ASPxGridView4.Visible = false;
            //ASPxGridView5.Visible = false;

            string dsql = "delete from DATA_SN_TEMP";
            dc.ExeSql(dsql);
        }

        //if (!IsPostBack)
        //{
        //    comboPlineCode.SelectedIndex = comboPlineCode.Items.Count >= 0 ? 0 : -1;

        //    string sql2 = "select PLAN_CODE from DATA_PLAN where PLINE_CODE='" + comboPlineCode.Value.ToString() + "' and BEGIN_DATE>sysdate-100 order by BEGIN_DATE,PLAN_CODE";
        //    comboPlanCode.DataSource = dc.GetTable(sql2);
        //    comboPlanCode.DataBind();

        //}
    }
Exemple #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserCode    = theUserManager.getUserCode();
        theUserName    = theUserManager.getUserName();
        theUserId      = theUserManager.getUserId();

        this.txtUserCode.Text = theUserCode;
        this.txtUserName.Text = theUserName;

        this.txtUserCode.Enabled = false;
        this.txtUserName.Enabled = false;

        TextBoxOldPass.Focus();

        getPassword();
        //string a = thePubCs.AESDecrypt("VxFs8B7jBINGy8nozGdmqJmxBmbIIiuekpQAT9FFlpY=");
    }
Exemple #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theProgramCode = "atpu1E00";
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();

            //string Sql2 = "SELECT STATION_CODE,STATION_NAME FROM CODE_STATION order by STATION_CODE ";
            //SqlDataSource2.SelectCommand = Sql2;
            //SqlDataSource2.DataBind();

            string Sql4 = "select a.pline_code,b.rmes_id,b.pline_name from VW_USER_ROLE_PROGRAM a "
                          + "left join code_product_line b on a.pline_code=b.pline_code "
                          + "where a.COMPANY_CODE = '" + theCompanyCode + "' and a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' order by b.PLINE_NAME";

            SqlDataSource4.SelectCommand = Sql4;
            SqlDataSource4.DataBind();
        }
Exemple #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            theUserCode    = theUserManager.getUserCode();
            programcode    = "ssd2200";
            if (!IsPostBack)
            {
            }
            if (Request["opFlag"] == "getPlan")
            {
                string str1     = "";
                string plancode = Request["PLAN"].ToString();
                string sql      = "select plan_so,plan_qty from data_plan where plan_code='" + plancode.ToUpper() + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string planso  = dc.GetTable().Rows[0][0].ToString();
                string planqty = dc.GetTable().Rows[0][1].ToString();

                if (planso == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = planso + "," + planqty;
                this.Response.Write(str1);
                this.Response.End();
            }
            setCondition();
        }