Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theProgramCode = "rept3500";
            MachineName    = System.Net.Dns.GetHostName();
            if (!IsPostBack)
            {
                initCode();
            }

            setCondition();


            if (Request["opFlag"] == "getEditSeries2")
            {
                string str1 = "", Site = "", So = "";
                //string so = Request["SO"].ToString().Trim().ToUpper();
                string    plancode = Request["PLANCODE"].ToString().Trim();
                string    sql      = "SELECT CUSTOMER_NAME ,PLAN_SO,ROUNTING_SITE FROM DATA_PLAN WHERE PLAN_CODE='" + plancode + "' ";
                DataTable dt       = dc.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    str1 = dt.Rows[0][0].ToString();

                    So   = dt.Rows[0][1].ToString();
                    Site = dt.Rows[0][2].ToString();
                }
                str1 = str1 + "@" + So + "@" + Site;
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Esempio n. 2
0
    private void setCondition()
    {
        string SO, CS;

        SO = ComboSo.Text.Trim();
        CS = ComboCS.Text.Trim();
        string sql = "SELECT  A.* ,B.CSMC  FROM VEPS_CSPZB A LEFT JOIN VEPS_CSRANGE B ON A.CSDM=B.CSDM WHERE ";

        if (SO != "" && CS != "")
        {
            sql = sql + "A.SO='" + ComboSo.Text.Trim() + "'AND A.CSDM='" + ComboCS.Text.Trim() + "'  ORDER BY A.CSDM ";
        }
        else if (SO != "" && CS == "")
        {
            sql = sql + "A.SO='" + ComboSo.Text.Trim() + "'  ORDER BY A.CSDM  ";
        }
        else if (SO == "" && CS != "")
        {
            sql = sql + "A.CSDM='" + ComboCS.Text.Trim() + "'  ORDER BY A.CSDM ";
        }
        else
        {
            sql = sql + "1=1 ORDER BY A.CSDM  ";
        }

        DataTable dt = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
        string sql2 = "select distinct so from veps_cspzb order by so ";

        ComboSo.DataSource = dc.GetTable(sql2);
        ComboSo.DataBind();
    }
Esempio n. 3
0
        //查询计划
        private void setCondition()
        {
            string beginDate = ASPxDateEdit1.Date.ToString("yyyy/MM/dd");
            string endDate   = ASPxDateEdit2.Date.ToString("yyyy/MM/dd");
            string sql       = "SELECT A.*,B.USER_CODE FROM DATA_PLAN A LEFT JOIN CODE_USER B ON A.CREATE_USERID = B.USER_ID"
                               + " WHERE BEGIN_DATE >= TO_DATE('" + beginDate + "','YYYY/MM/DD HH24:MI:SS')"
                               + " AND END_DATE <= TO_DATE('" + endDate + "','YYYY/MM/DD HH24:MI:SS')"
                               + " AND A.PLINE_CODE IN (SELECT PLINE_CODE FROM VW_USER_ROLE_PROGRAM WHERE USER_ID = '"
                               + theUserId + "' AND PROGRAM_CODE = '" + theProgramCode + "' AND COMPANY_CODE = '" + theCompanyCode + "')"
                               + " ORDER BY A.BEGIN_DATE DESC, A.PLAN_SEQ DESC ";
            DataTable dt = dc.GetTable(sql);

            //不让敏感字出现
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string remark1   = dt.Rows[i]["REMARK"].ToString();
                string planCode1 = dt.Rows[i]["PLAN_CODE"].ToString();
                sql = "select FUNC_GET_REMARK('" + planCode1 + "', '" + remark1 + "') from dual ";
                dc.setTheSql(sql);
                dt.Rows[i]["REMARK"] = dc.GetValue();;
            }

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Esempio n. 4
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();
            }
        }
Esempio n. 5
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);
        }
    }
Esempio n. 6
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();
            }
        }
Esempio n. 7
0
    private void setCondition()
    {
        string sql = "select * from sjbomsothxc where 1=1 ";

        if (txtDH.Text.Trim() != "")
        {
            sql = sql + "and THGROUP='" + txtDH.Value.ToString() + "'";
        }
        if (txtJHDM.Text.Trim() != "")
        {
            sql = sql + "and JHDM='" + txtJHDM.Value.ToString() + "'";
        }

        sql = sql + " order by rqsj desc";
        DataTable dt = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();

        sql = "select * from RST_ATPU_ZJTS_LOG where 1=1 ";
        if (txtJHDM.Text.Trim() != "")
        {
            sql = sql + "and JHDM='" + txtJHDM.Value.ToString() + "'";
        }

        sql = sql + " order by rqsj desc";
        DataTable dt1 = dc.GetTable(sql);

        ASPxGridView2.DataSource = dt1;
        ASPxGridView2.DataBind();
    }
Esempio n. 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theProgramCode = "atpu1400";
            initPlineCode();
            //string sql="SELECT PLAN_CODE,PLINE_CODE,BZSO,JX,GL,ZS,QFJQ 气阀进气,QFPQ 气阀排气,PL 排量,DS 怠速,XL 系列,FHCX 发火次序, "
            //    +"XNBH 性能表号,DYJX 打印机型,KHH 客户号,GD 固定日期,JZL 净重量,PYZS 喷油正时,EDGYL 额定供油率,HB 海拔, "
            //    +"ENYN 是否英文,PRSG 是否客户号代替总成号,GL1 额定功率二,ZS1 额定转速二,BYGL1 备用功率一,BYZS1 备用转速一, "
            //    +"BYGL2 备用功率二,BYZS2 备用转速二,NOX,PM ,KHGG 客户规格,SCXKZ 生产许可证,EPA,PFJD 排放阶段,PFJDHZH 排放阶段核准号, "
            //    +"FR,MPLJH 铭牌零件号,XZJD 限值阶段,DYGLD 对应功率段,ZDJGL 最大净功率,ZXBZ 执行标准,XZMC 系族名称, "
            //    +"XSHZHHMLY 形式核准号豁免理由,HCLZZLX 后处理装置类型 FROM atpuplannameplate";
            string sql = "select * from atpuplannameplate where pline_code in (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')  and plan_code='" + txtPlan.Text.ToUpper() + "'";

            DataTable dt = dc.GetTable(sql);

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();


            string sql2 = "SELECT * FROM COPY_VEPS_DATA where so='" + txtSoQry.Text.Trim().ToUpper() + "'";

            DataTable dt2 = dc.GetTable(sql2);

            ASPxGridView2.DataSource = dt2;
            ASPxGridView2.DataBind();
        }
Esempio n. 9
0
    private void setCondition()
    {
        string sql = "select  a.material_code ,a.gzdd,a.gys_code ,sum(a.material_num) material_num ,a.create_time ,a.qadsite ,b.ptp_buyer ,a.flag  from atpufsb a,copy_ptp_det b where  a.flag='N' and a.material_code=b.ptp_part and a.qadsite=b.ptp_site ";

        if (txtPCode.Text.Trim() != "")
        {
            sql = sql + "and a.gzdd = '" + txtPCode.Value.ToString() + "'";
        }
        if (ASPxDateEdit1.Text.Trim() != "")
        {
            sql = sql + " AND a.create_time>=to_date('" + ASPxDateEdit1.Text.Trim() + "','YYYY-MM-DD') ";
        }
        if (ASPxDateEdit2.Text.Trim() != "")
        {
            sql = sql + " AND a.create_time<=to_date('" + ASPxDateEdit2.Text.Trim() + "','YYYY-MM-DD') ";
        }
        if (textMcode.Text.Trim() != "")
        {
            sql = sql + " AND a.material_code like '%" + textMcode.Text.Trim() + "%' ";
        }
        if (textGcode.Text.Trim() != "")
        {
            sql = sql + " AND a.gys_code like '%" + textGcode.Text.Trim() + "%'";
        }

        sql = sql + " group by a.material_code,a.gys_code,a.create_time,a.qadsite,a.flag,b.ptp_buyer,a.gzdd order by a.create_time,a.material_code ";
        DataTable dt = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }
Esempio n. 10
0
    protected void ASPxGridView1_HtmlEditFormCreated(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewEditFormEventArgs e)
    {
        //创建Editform,对其中某些字段进行属性设置

        ASPxComboBox uPcode = ASPxGridView1.FindEditFormTemplateControl("dropPlineCode") as ASPxComboBox;
        ASPxComboBox uScode = ASPxGridView1.FindEditFormTemplateControl("dropStationCode") as ASPxComboBox;

        string    Sql2 = "select pline_code,pline_code||' '||pline_name as showtext from CODE_PRODUCT_LINE";
        DataTable dt2  = dc.GetTable(Sql2);

        uPcode.DataSource = dt2;
        uPcode.TextField  = dt2.Columns[1].ToString();
        uPcode.ValueField = dt2.Columns[0].ToString();


        string    Sql3 = "SELECT STATION_CODE,STATION_CODE||' '||STATION_NAME AS SHOWTEXT FROM CODE_STATION";
        DataTable dt3  = dc.GetTable(Sql3);

        uScode.DataSource = dt3;
        uScode.TextField  = dt3.Columns[1].ToString();
        uScode.ValueField = dt3.Columns[0].ToString();

        if (!ASPxGridView1.IsNewRowEditing && ASPxGridView1.IsEditing)
        {
            ///主键不可以修改
            (ASPxGridView1.FindEditFormTemplateControl("txtSubCode") as ASPxTextBox).Enabled = false;
        }
    }
Esempio n. 11
0
    //查询
    private void Contrast_A()
    {
        string sql = "Select PLAN_SO,SN,to_char(WORK_TIME,'yyyy-mm-dd hh24:mi:ss') WORK_TIME from DATA_PRODUCT a where  ";

        if (txtPCode.Text.Trim() != "")
        {
            sql = sql + " PLINE_CODE='" + txtPCode.Value.ToString() + "' and  not exists (select ghtm from dp_rckwcb b where a.SN=b.ghtm and gzdd='" + txtPCode.Value.ToString() + "' and Rc='入库') ";
        }
        else
        {
            sql = sql + "  PLINE_CODE IN (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')  and  not exists "
                  + " (select ghtm from dp_rckwcb b where a.SN=b.ghtm and gzdd in (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')  and Rc='入库') ";
        }
        if (ASPxDateEdit1.Text.Trim() != "")
        {
            sql = sql + "AND  WORK_TIME>=to_date('" + ASPxDateEdit1.Text.Trim() + "','YYYY-MM-DD  hh24:mi:ss') ";
        }
        if (ASPxDateEdit3.Text.Trim() != "")
        {
            sql = sql + " AND WORK_TIME<=to_date('" + ASPxDateEdit3.Text.Trim() + "','YYYY-MM-DD  hh24:mi:ss') ";
        }

        sql = sql + " order by SN";
        DataTable dt = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }
Esempio n. 12
0
 protected void CmdExport_Click(object sender, EventArgs e)
 {
     //导出
     ASPxGridView1.DataSource = dc.GetTable(Session["str"].ToString());
     ASPxGridView1.DataBind();
     ASPxGridViewExporter1.WriteXlsToResponse("零件替换关系");
 }
Esempio n. 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theTime        = DateTime.Now;
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            theProgramCode = "atpu2900";
            if (!IsPostBack)
            {
                initCode();
            }
            setCondition();
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "";
                string so   = Request["SO"].ToString().Trim();

                string    sql = "select JX,GL,QFJQ,QFPQ,PL,XL,DS,FHCX,XNBH,DYJX,ZS,KHH,GD,PRSG,JZL,PYZS,EDGYL,HB,ENYN,GL1,ZS1,BYGL1,BYZS1,BYGL2,BYZS2,NOX,PM,KHGG,PEL,EPA,PFJD,PFJDHZH,FR,MPLJH,XZJD,DYGLD,ZDJGL,ZXBZ,XZMC,CZYG,XSHZHHMLY,HCLZZLX,SCXKZ from NAMEPLATE_SO where bzso='" + so + "'  ";
                DataTable dt  = dc.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < 43; i++)
                    {
                        string str = dt.Rows[0][i].ToString();
                        str1 = str1 + "@" + str;
                    }
                }
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Esempio n. 14
0
        //初始化GridView
        private void setCondition()
        {
            String sql = "SELECT T.*,ROWID FROM MS_SFJIT_RESULT_PO T ";

            sql += " WHERE 1 =1 ";
            //TEST
            //sql += " AND ROWNUM <= 100 ";
            if (ComboGzdd.Text.Trim() != "")
            {
                sql += " AND GZDD = '" + ComboGzdd.Value.ToString() + "' ";
            }
            //不选择BILL_CODE则设为空,即不查询数据
            if (ComboBillCode.Text == "" || ComboBillCode.Text == null)
            {
                sql += " AND BILL_CODE = '' ";
            }
            if (ComboBillCode.Text.Trim() != "")
            {
                sql += " AND BILL_CODE = '" + ComboBillCode.Text + "' ";
            }
            sql += " ORDER BY LOCATION_CODE,MATERIAL_CODE ";

            DataTable dt = dc.GetTable(sql);

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Esempio n. 15
0
    private void setCondition()
    {
        string Chsql = "";

        if (Plan1.Text.Trim() == "" || Plan2.Text.Trim() == "")
        {
            return;
        }
        else
        {
            if (chkProcess.Value.ToString() == "True")
            {
                Chsql = "select ABOM_COMP 零件,ABOM_DESC 名称,ABOM_QTY 数量,ABOM_OP 工序,ABOM_WKCTR 工位,ABOM_BOM1 BOM1中有,ABOM_BOM2 BOM2中有,ABOM_USER 比较用户 from rst_bom_compare where abom_user='******'";
            }
            else
            {
                Chsql = "select abom_comp 零件,abom_desc 名称,sum(cc) 对比数量 from ( select abom_comp,abom_desc,-1*bb cc from (SELECT abom_comp,abom_desc,sum(abom_qty) bb from rst_bom_compare  where abom_user='******' "
                        + " AND ABOM_BOM1='1' group by (abom_comp,abom_desc))  where (abom_comp,abom_desc,bb) not in(  SELECT abom_comp,abom_desc,sum(abom_qty) from rst_bom_compare "
                        + " where abom_user='******' AND ABOM_BOM1='0' group by (abom_comp,abom_desc) ) Union  select abom_comp,abom_desc,cc from (SELECT abom_comp,abom_desc,sum(abom_qty) cc from rst_bom_compare "
                        + " where abom_user='******' AND ABOM_BOM1='0' group by (abom_comp,abom_desc)) where (abom_comp,abom_desc,cc) not in (SELECT abom_comp,abom_desc,sum(abom_qty) from rst_bom_compare where abom_user='******' AND ABOM_BOM1='1' group by (abom_comp,abom_desc)))group by abom_comp,abom_desc";
            }


            DataTable Chdt = dc.GetTable(Chsql);
            ASPxGridView1.DataSource = Chdt;
            ASPxGridView1.DataBind();
        }
    }
Esempio n. 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string    sql = "select config from copy_engine_property where upper(so)=upper('" + Request["so"].ToString() + "')";
                DataTable dt  = dc.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    thgxjx = dt.Rows[0][0].ToString();
                    if (thgxjx.Substring(thgxjx.Length - 2, 2) == "ZZ")
                    {
                        thgxjx = thgxjx.Substring(0, thgxjx.Length - 2);
                    }
                }

                //显示计划bom里存在的替换关系组
                sql = "select distinct thgroup from sjbomthset where (so='" + Request["so"].ToString()
                      + "' or so='" + thgxjx + "') and settype='1' "
                      + " and usetime<=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd') and endtime>=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd')"
                      + " and oldpart in (select item_code from data_plan_standard_bom where plan_code='" + Request["planCode"].ToString() + "')"
                      + " and oldpart not in (select xxptmp_comp from qad_xxptmp_mstr where xxptmp_jhdm='" + Request["planCode"].ToString() + "')"
                      + " and thgroup not in( select distinct thgroup from sjbomthset where (so='" + Request["so"].ToString()
                      + "' or so='" + thgxjx + "') and settype='1' "
                      + " and usetime<=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd') and endtime>=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd')"
                      + " and oldpart not in (select item_code from data_plan_standard_bom where plan_code='" + Request["planCode"].ToString() + "') and oldpart is not null )  ";

                //sql = "select distinct thgroup from sjbomsothmuti where so='" + Request["so"].ToString() + "' and jhdm='" + Request["planCode"].ToString() + "' and gzdd='" + ThisSite + "'";
                cmbGroup.DataSource = dc.GetTable(sql);
                cmbGroup.TextField  = "thgroup";
                cmbGroup.ValueField = "thgroup";
                cmbGroup.DataBind();
            }
        }
Esempio n. 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager        = (userManager)Session["theUserManager"];
        string      theDisplayCompanyCode = theUserManager.getCompanyCode();
        string      theMenuUserId         = theUserManager.getUserId();

        //根据默认首页判断转向页面
        string theSql = "SELECT PROGRAM_VALUE FROM REL_USER_DEFAULTPAGE A "
                        + "LEFT JOIN CODE_PROGRAM B ON A.DEFAULT_PAGE = B.PROGRAM_CODE AND A.COMPANY_CODE = B.COMPANY_CODE "
                        + "WHERE A.COMPANY_CODE = '" + theDisplayCompanyCode + "' AND USER_ID = '" + theMenuUserId + "'";

        dc.setTheSql(theSql);
        DataTable dt          = dc.GetTable();
        string    currentPage = "";

        if (dt.Rows.Count > 0)
        {
            currentPage = dc.GetTable().Rows[0]["PROGRAM_VALUE"].ToString();
            Response.Write("<script>location.href='" + "../.." + currentPage + "';</script>");
        }
        else
        {
            Response.Write("<script>location.href='../Login/RmesDefaultPage.aspx';</script>");
        }
    }
Esempio n. 18
0
        private void setCondition()
        {
            string datetime = ASPxDateEdit2.Date.ToShortDateString() + " 23:59:59";
            string sql      = "SELECT a.SN ,a.station_name ,a.create_time , b.user_name,a.pline_code ,a.item_code ,a.item_sn ,a.item_name ,a.item_vendor ,"
                              + " a.barcode   FROM data_scan_item a left join code_user b on a.CREATE_USERID=b.USER_CODE  ";

            if (txtSN.Text.Trim() != "")
            {
                string gzsql = "select a.plan_type from data_plan a left join data_plan_sn b on a.plan_code=b.plan_code  where b.sn='" + txtSN.Text.Trim() + "' ";
                string type  = dc.GetValue(gzsql);
                if (type != "C" || type != "D")
                {
                    return;
                }
                sql = sql + " WHERE a.SN='" + txtSN.Text.Trim() + "' ";
            }
            else
            {
                sql = sql + "where a.CREATE_TIME>=to_date('" + ASPxDateEdit1.Text.Trim() + "','yyyy-mm-dd hh24:mi:ss') and a.CREATE_TIME<=to_date('" + datetime + "','yyyy-mm-dd hh24:mi:ss')";
            }

            DataTable dt = dc.GetTable(sql);

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Esempio n. 19
0
    private void initCode()
    {
        //初始化下拉列表
        string sql = "select distinct a.pline_code,b.pline_name 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 + "'";

        SqlCode.SelectCommand = sql;
        SqlCode.DataBind();
        SqlCode1.SelectCommand = sql;
        SqlCode1.DataBind();
        SqlCode2.SelectCommand = sql;
        SqlCode2.DataBind();
        //txtPCode.SelectedIndex = txtPCode.Items.Count >= 0 ? 0 : -1;
        //txtPCode1.SelectedIndex = txtPCode.Items.Count >= 0 ? 0 : -1;
        //txtPCode2.SelectedIndex = txtPCode.Items.Count >= 0 ? 0 : -1;

        string Sql2 = "  select pt_part from copy_pt_mstr order by pt_part";

        SqlICode.SelectCommand = Sql2;
        SqlICode.DataBind();

        string    Sql3 = "select DETECT_NAME from code_detect where pline_code in ( SELECT PLINE_ID FROM VW_USER_ROLE_PROGRAM WHERE USER_ID='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')  ";
        DataTable dt3  = dc.GetTable(Sql3);

        ASPxListBoxUnused.DataSource = dt3;
        ASPxListBoxUnused.DataBind();
    }
Esempio n. 20
0
        private void setCondition()
        {
            string    sql = "SELECT SO,TJLX,YHMC,RQSJ FROM ATPUSOTJB order by RQSJ desc nulls last";
            DataTable dt  = dc.GetTable(sql);

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Esempio n. 21
0
    private void SetCondition()
    {
        string    sql = "select oldghtm||'--'||newghtm sn from atpu_ghtm_oldnew where ifth='N'";
        DataTable dt  = dc.GetTable(sql);

        ASPxListBox1.DataSource = dt;
        ASPxListBox1.DataBind();
    }
Esempio n. 22
0
    protected void ASPxListBoxUnused_Init()
    {
        string    sql = "select distinct part from PART_FZLX where part is not null order by part";
        DataTable dt  = dc.GetTable(sql);

        ASPxListBoxUnused.DataSource = dt;
        ASPxListBoxUnused.DataBind();
    }
Esempio n. 23
0
    //初始化GRIDVIEW
    private void queryFunction()
    {
        string    sql = "SELECT A.COMPANY_CODE, A.USER_ID, A.USER_CODE, A.USER_NAME FROM CODE_USER A WHERE A.COMPANY_CODE = '" + theCompanyCode + "' and user_type='B'";
        DataTable dt  = theDc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }
Esempio n. 24
0
        private void setCondition()
        {
            //初始化GRIDVIEW
            string    sql = "SELECT * FROM NAMEPLATE_SO ORDER BY MODIFYDATE DESC";
            DataTable dt  = dc.GetTable(sql);

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Esempio n. 25
0
    private void setCondition()
    {
        string sql = "select a.*,b.pline_name from MS_LOCATION_TIME a left join code_product_line b on a.gzdd=b.pline_code where gzdd in "
                     + "( select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') order by input_time desc nulls last ";
        DataTable dt = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }
Esempio n. 26
0
    private void setCondition()
    {
        //初始化GRIDVIEW
        string    sql = "SELECT VENDOR_CODE,VENDOR_NAME,DECODE(TYPE,'A','供应商','B','客户',TYPE) TYPE FROM CODE_VENDOR WHERE COMPANY_CODE = '" + theCompanyCode + "' ORDER BY VENDOR_CODE";
        DataTable dt  = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }
Esempio n. 27
0
    private void setCondition()
    {
        //初始化GRIDVIEW
        string    sql = "SELECT * FROM ATPUKHTM order by INPUT_TIME desc nulls last";
        DataTable dt  = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }
Esempio n. 28
0
    //private void initCode()
    //{
    //    //初始化生产线下拉列表
    //    string sql = "select distinct a.pline_code,b.pline_name  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 + "'";
    //    SqlCode.SelectCommand = sql;
    //    SqlCode.DataBind();
    //}
    private void setCondition()
    {
        //初始化GRIDVIEW
        string    sql = "SELECT * FROM DMSOPFB where DD in (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') order by INPUT_TIME desc nulls last ";
        DataTable dt  = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }
Esempio n. 29
0
    private void setCondition()
    {
        //绑定表数据
        string    sql = "select cp.pline_name,cd.* from code_detect_data cd,code_product_line cp where cp.pline_code=cd.pline_code and cd.company_code=" + theCompanyCode;
        DataTable dt  = dc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }
Esempio n. 30
0
    private void queryFunction()
    {
        //初始化GRIDVIEW
        string    sql = "SELECT COMPANY_CODE,PLINE_CODE,TEAM_CODE,USER_ID,USER_CODE,USER_NAME,TEAM_NAME,PLINE_NAME FROM VW_REL_TEAM_USER WHERE COMPANY_CODE = '" + theCompanyCode + "' AND PLINE_CODE='" + thePlCode + "' ORDER BY USER_CODE";
        DataTable dt  = theDc.GetTable(sql);

        ASPxGridView1.DataSource = dt;
        ASPxGridView1.DataBind();
    }