예제 #1
0
        protected void cmbPlineCode_Init(object sender, EventArgs e)
        {
            //显示生产线列表
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userId         = theUserManager.getUserId();
            string      companyCode    = theUserManager.getCompanyCode();
            string      sql            = "select pline_code,pline_name from vw_user_role_program a "
                                         + "where user_id='" + userId + "' and program_code='mmsMaterialRequisitionQry' and company_code='" + companyCode
                                         + "' ";

            dc.setTheSql(sql);
            cmbPline.DataSource = dc.GetTable();
            cmbPline.TextField  = "pline_name";
            cmbPline.ValueField = "pline_code";
            cmbPline.DataBind();
        }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();

        //初始化新增模版里程序下拉列表
        initProgram();

        //初始化新增模版里角色下拉列表
        initRole();
        //初始化新增模版里生产线下拉列表
        initPline();

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

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


        //修改新开页面title,方便用户查看

        string theDisplayProgramName = Request.QueryString["progName"];

        this.Master.Page.Title = theDisplayProgramName;

        initGrid();
    }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theProgramCode = "rept2300";
            MachineName    = System.Net.Dns.GetHostName();
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit2.Date = DateTime.Now.AddDays(1);
            }

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

        companyCode    = theUserManager.getCompanyCode();
        theUserCode    = theUserManager.getUserId();
        theProgramCode = "epd1800";
        queryFunction();


        string plineSql = "SELECT PLINE_CODE,PLINE_NAME FROM vw_user_role_program WHERE COMPANY_CODE='" + companyCode + "' AND USER_ID='" + theUserCode + "' and program_code='" + theProgramCode + "' order by pline_code";


        SqlDataSource1.SelectCommand = plineSql;
        SqlDataSource1.DataBind();
    }
예제 #7
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();
    }
예제 #8
0
        private void setCondition()
        {
            //初始化GRIDVIEW
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      companyCode    = theUserManager.getCompanyCode();

            string sql = "SELECT a.*,b.pline_name,"
                         + "case NOTE_TYPE when 'A' then '工艺路线+SO+工序' when 'B' then '工艺路线+工序' when 'C' then 'SO+工序' when 'D' then '组件+工序' when 'E' then 'SO+组件+工序' end noteType "
                         + "from data_process_note a "
                         + "left join code_product_line b on a.pline_code=b.rmes_id "
                         + "where a.company_code='" + companyCode + "' and a.pline_code in (select pline_id from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') order by a.NOTE_TYPE,a.rmes_id";
            DataTable dt = dc.GetTable(sql);

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
예제 #9
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();
        }
    }
예제 #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 = "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();
        }
    }
예제 #11
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);
        }
    }
예제 #12
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";


        if (!IsPostBack)
        {
            //initLocation();
            initPlineCode();
        }
        setCondition();
    }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      theCompanyCode = theUserManager.getCompanyCode();
            string      theUserID      = theUserManager.getUserId();

            if (!IsPostBack)
            {
                List <LineSideStoreEntity> stores     = LinesideStoreFactory.GetAll();
                List <PlanEntity>          dataSource = PlanFactory.GetByUserID(theUserID);
                PlanCode.DataSource = dataSource;
                PlanCode.ValueField = "ORDER_CODE";
                PlanCode.TextField  = "ORDER_CODE";
                PlanCode.DataBind();
            }
            setCondition();
        }
예제 #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        companyCode    = theUserManager.getCompanyCode();
        theUserCode    = theUserManager.getUserId();
        theProgramCode = "epd1500";
        queryFunction();

        string plineSql = "SELECT a.rmes_id,a.PLINE_NAME FROM CODE_PRODUCT_LINE a where pline_code in (select pline_code from vw_user_role_program where user_id='" + theUserCode + "' and program_code='" + theProgramCode + "' and company_code='" + companyCode + "') "

                          + " order by a.pline_code";


        SqlDataSource1.SelectCommand = plineSql;
        SqlDataSource1.DataBind();
    }
예제 #15
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();
    }
예제 #16
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            //确认
            //ASPxGridView atl1 = (ASPxGridView)sender;
            List <object> rowid = grid.GetSelectedFieldValues("ROWID");
            //List<object> planCode = grid.GetSelectedFieldValues("JHDM");
            //List<object> oldPart = grid.GetSelectedFieldValues("LJDM1");
            //List<object> newPart = grid.GetSelectedFieldValues("LJDM2");
            //List<object> SO = grid.GetSelectedFieldValues("SO");
            //List<object> locationCode = grid.GetSelectedFieldValues("GWMC");

            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();
            string      companyCode    = theUserManager.getCompanyCode();

            for (int i = 0; i < rowid.Count; i++)
            {
                string planCode     = dc.GetValue("select jhdm from sjbomsoth where rowid='" + rowid[i].ToString() + "'");
                string SO           = dc.GetValue("select SO from sjbomsoth where rowid='" + rowid[i].ToString() + "'");;
                string oldPart      = dc.GetValue("select LJDM1 from sjbomsoth where rowid='" + rowid[i].ToString() + "'");;
                string newPart      = dc.GetValue("select LJDM2 from sjbomsoth where rowid='" + rowid[i].ToString() + "'");;
                string locationCode = dc.GetValue("select GWMC from sjbomsoth where rowid='" + rowid[i].ToString() + "'");

                string sql = "select IS_JHONLINE('" + planCode.ToString() + "','" + SO.ToString()
                             + "','" + plineCode + "') from dual";
                string retVal = dc.GetValue(sql);
                if (retVal == "0" || retVal == "3")
                {
                    sql = "update SJBOMSOTH set istrue=1,qrygmc='" + userName + "' WHERE to_date(to_char(LRSJ,'yyyy-mm-dd'),'yyyy-mm-dd')>=to_date('" + DateFrom.Text
                          + "','yyyy-mm-dd') AND to_date(to_char(LRSJ,'yyyy-mm-dd'),'yyyy-mm-dd')<=to_date('" + DateTo.Text
                          + "','yyyy-mm-dd') AND GZDD='" + plineCode + "' and istrue<>1 and ygmc='" + userName + "' and jhdm='" + planCode.ToString()
                          + "' and ljdm1='" + oldPart.ToString() + "' and gwmc='" + locationCode.ToString() + "'";

                    dc.ExeSql(sql);
                }
                else
                {
                    //xiugai yxh
                    Response.Write("<script>alert('计划已上线,将提交给调度确认');</script>");
                    BomReplaceFactory.MW_MODIFY_SJBOMTHCFM("ADD", planCode, SO, oldPart, newPart,
                                                           userName, locationCode, plineCode);
                }
            }

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

        theCompanyCode = theUserManager.getCompanyCode();

        state = (String)Session["state"];

        if (state == "F" || state == "D")
        {
            REMEND_NOTE_ID = (String)Session["REMEND_NOTE_ID"];
        }
        if (state == "F_FP" || state == "D_FP")
        {
            WASTER_NOTE_ID = (String)Session["WASTER_NOTE_ID"];
        }
    }
예제 #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     userManager theUserManager = (userManager)Session["theUserManager"];
     string companyCode = theUserManager.getCompanyCode();
     string urls = Request["Pic"].ToString();
     string[] _urls = urls.Split('|');
     string plinecode = "E";
     if (_urls[_urls.Length - 1] != null)
     {
         if (_urls[_urls.Length - 1] != "")
             plinecode = dc.GetValue("select pline_code from code_product_line where rmes_id='" + _urls[_urls.Length - 1] + "'");
     }
     string sql = "";
     string Iurl = "";
     if (_urls[0] == "N")
     {
         sql = "select INTERNAL_VALUE FROM CODE_INTERNAL WHERE COMPANY_CODE='" + companyCode
            + "' AND INTERNAL_TYPE_CODE='PATH' AND INTERNAL_CODE='PROCESSNOTEPATH'";
         Iurl = dc.GetValue(sql);
         for (int i = 1; i < _urls.Length; i++)
         {
             string name = "ima" + i.ToString();
             Image ima = new Image();
             //ima.ImageUrl = "\\\\192.168.112.144\\mes共享\\FILES\\PROCESSNOTEPIC\\" + plinecode + "\\" + _urls[i].Split('\\')[_urls[i].Split('\\').Length - 1];
             ima.ImageUrl = @Iurl + "\\" + plinecode + "\\" + _urls[i].Split('\\')[_urls[i].Split('\\').Length - 1]; ;
             ima.DataBind();
             GraphPlaceHolder.Controls.Add(ima);
         }
     }
     else if (_urls[0] == "A")
     {
         sql = "select INTERNAL_VALUE FROM CODE_INTERNAL WHERE COMPANY_CODE='" + companyCode
            + "' AND INTERNAL_TYPE_CODE='PATH' AND INTERNAL_CODE='QUALITYALERTPATH'";
         Iurl = dc.GetValue(sql);
         for (int i = 1; i < _urls.Length; i++)
         {
             string name = "ima" + i.ToString();
             Image ima = new Image();
             //ima.ImageUrl = "\\\\192.168.112.144\\mes共享\\FILES\\QUALITYALERTPIC\\" + plinecode + "\\" + _urls[i].Split('\\')[_urls[i].Split('\\').Length - 1];
             ima.ImageUrl = @Iurl + "\\" + plinecode + "\\" + _urls[i].Split('\\')[_urls[i].Split('\\').Length - 1]; ;
             ima.DataBind();
             GraphPlaceHolder.Controls.Add(ima);
         }
     }
 }
예제 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            theProgramCode = "atpu1C00";

            string Sql3 = "SELECT distinct a.PT_PART FROM COPY_PT_MSTR a left join copy_ptp_det b on a.PT_PART=b.PTP_PART "
                          + "where b.ptp_phantom=0 and upper(a.pt_group)='M' and upper(b.ptp_site) in('DCEC-B','DCEC-C') order by PT_PART ";

            SqlDataSource3.SelectCommand = Sql3;
            SqlDataSource3.DataBind();

            setCondition1();
            setCondition2();
        }
예제 #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theProgramCode = "epd1100";
        //this.TranslateASPxControl(ASPxGridView1);


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

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

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theProgramCode = "rept1600";
        //MachineName = System.Net.Dns.GetHostName();
        string hostIPAddress = Page.Request.UserHostAddress;

        //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
        MachineName = hostIPAddress;
        string sql2 = "select STATION_CODE,STATION_NAME from CODE_STATION order by STATION_NAME";

        StationCode.SelectCommand = sql2;
        StationCode.DataBind();
        setCondition();
    }
예제 #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();

        string sqlOld = "select RMES_ID,PLINE_NAME from CODE_PRODUCT_LINE where COMPANY_CODE = '" + theCompanyCode + "' order by PLINE_NAME";

        //dropPlineCode.DataSource = dc.GetTable(sqlOld);
        //dropPlineCode.DataBind();



        if (!IsPostBack)
        {
        }
        //setCondition();
    }
예제 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserID      = theUserManager.getUserId();
            if (!IsPostBack)
            {
                //cdate1.Value = DateTime.Today.AddDays(-3);
                //cdate2.Value = DateTime.Today.AddDays(1);
                List <ProductLineEntity> plineEntities = ProductLineFactory.GetAll();
                foreach (var p in plineEntities)
                {
                    ComPline.Items.Add(p.PLINE_NAME, p.PLINE_CODE);
                }
            }
            BindData();
        }
예제 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theProgramCode = "rept2200";
            string hostIPAddress = Page.Request.UserHostAddress;

            //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
            MachineName = hostIPAddress;
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit2.Date = DateTime.Now.AddDays(1);
            }
            setCondition();
        }
예제 #26
0
    protected void Button_Confirm_Click(object sender, EventArgs e)
    {
        //得到当前用户信息
        Boolean theLoginFlag   = false;
        string  theCompanyCode = "";

        userManager theUserManger1 = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManger1.getCompanyCode();

        loginManager theLoginManager = new loginManager();

        theLoginManager.setCompanyCode(theCompanyCode);
        theLoginFlag = theLoginManager.loginOut(theUserManger1.theSessionCode);

        //关闭页面,但不再提示是否关闭
        Response.Write("<script language=JavaScript>window.opener=null; window.parent.close();</script>");
    }
예제 #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theProgramCode = "rept1700";
        //MachineName = System.Net.Dns.GetHostName();
        string hostIPAddress = Page.Request.UserHostAddress;

        //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
        MachineName = hostIPAddress;
        if (!IsPostBack)
        {
            //txtChose.SelectedIndex = 0;

            //txtPlanCode.SelectedIndex = 0;
            setCondition();
        }
        setCondition();

        if (Request["opFlag"] == "getEditSeries")
        {
            string str1 = "", str2 = "";
            string sn = Request["SN"].ToString().Trim();

            string    sql = "SELECT DISTINCT(product_model),plan_so,plan_code FROM DATA_PRODUCT where sn='" + sn + "'";
            DataTable dt  = dc.GetTable(sql);
            if (dt.Rows.Count > 0)
            {
                string Pmodel = dt.Rows[0][0].ToString();
                string planso = dt.Rows[0][1].ToString();
                str1 = Pmodel + "@" + planso;
            }
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                str2 = dt.Rows[i][2].ToString();
                str1 = str1 + "@" + str2;
            }
            txtPlanCode.SelectedIndex = 0;
            this.Response.Write(str1);
            this.Response.End();
        }
    }
예제 #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theProgramCode = "rept1500";
        initCode();
        setCondition();


        if (!IsPostBack)
        {
            //ASPxDateEdit1.Date = DateTime.Now;
            //ASPxDateEdit2.Date = DateTime.Now.AddDays(1);
            ASPxDateEdit3.Date = DateTime.Now;
            ASPxDateEdit4.Date = DateTime.Now;//.AddDays(1);
            //ASPxDateEdit5.Date = DateTime.Now;
            //ASPxDateEdit6.Date = DateTime.Now.AddDays(1);
        }
        if (Request["opFlag"] == "getEditSeries")
        {
            string str1 = "";

            string chose = Request["CHOSE"].ToString().Trim();
            string Sql3  = "select distinct DETECT_NAME from code_detect where  DETECT_NAME like '%" + chose + "%' ";
            if (txtPCode2.Text.Trim() != "")
            {
                Sql3 = Sql3 + " and pline_code='" + txtPCode2.Value.ToString() + "'";
            }
            else
            {
                Sql3 = Sql3 + " and pline_code in ( SELECT PLINE_ID FROM VW_USER_ROLE_PROGRAM WHERE USER_ID='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')  ";
            }
            Session["rept1500"] = Sql3;
            DataTable dt3 = dc.GetTable(Sql3);
            ASPxListBoxUnused.DataSource = dt3;
            ASPxListBoxUnused.DataBind();

            this.Response.Write(str1);
            this.Response.End();
        }
    }
예제 #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            theProgramCode = "rept3200";
            userManager theUserManager = (userManager)Session["theUserManager"];

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

            if (!IsPostBack)
            {
                //放在外面每次都初始化
                //对调序有影响,先不设默认值??
                //txtPCode.Value = "E";
            }
            initPlineCode();
            //init_CmbZddm();
            setCondition1();
            setCondition();
        }
예제 #30
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();
        }