Ejemplo n.º 1
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 distinct DETECT_NAME from code_detect where   ";

        if (txtPCode2.Text.Trim() != "")
        {
            Sql3 = Sql3 + "  pline_code='" + txtPCode2.Value.ToString() + "'";
        }
        else
        {
            Sql3 = Sql3 + "  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();
    }
Ejemplo n.º 2
0
 protected void ASPxCallbackPanel4_Callback(object sender, CallbackEventArgsBase e)
 {
     try
     {
         if (Session["rept1500"].ToString() != "")
         {
             string    Sql3 = Session["rept1500"] as string;
             DataTable dt3  = dc.GetTable(Sql3);
             ASPxListBoxUnused.DataSource = dt3;
             ASPxListBoxUnused.DataBind();
         }
         else
         {
             string Sql3 = "select  distinct DETECT_NAME from code_detect where   ";
             if (txtPCode2.Text.Trim() != "")
             {
                 Sql3 = Sql3 + "  pline_code='" + txtPCode2.Value.ToString() + "'";
             }
             else
             {
                 Sql3 = Sql3 + "  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();
         }
     }
     catch
     { }
 }
Ejemplo n.º 3
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();
    }
Ejemplo n.º 4
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 = "", Sql3 = "";

            //string chose = Request["CHOSE"].ToString().Trim();
            string chose = System.Web.HttpUtility.UrlDecode(Request["CHOSE"]);
            if (chose != "null")
            {
                Sql3 = "select distinct DETECT_NAME from code_detect where  DETECT_NAME like '%" + chose + "%' ";
            }
            else
            {
                Sql3 = "select distinct DETECT_NAME from code_detect  where  DETECT_NAME like '%%'";
            }
            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 + "')  ";
            }

            Sql3 = Sql3 + " order by DETECT_NAME";
            Session["rept1500"] = Sql3;
            DataTable dt3 = dc.GetTable(Sql3);
            ASPxListBoxUnused.DataSource = dt3;
            ASPxListBoxUnused.DataBind();

            this.Response.Write(chose);
            this.Response.End();
        }
    }
Ejemplo n.º 5
0
        //查询
        //protected void query_Click(object sender, EventArgs e)
        //{
        //    init_listLSH();
        //}
        //初始化流水号列表
        protected void ASPxListBoxUnused_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string sql = "select ghtm from zzplshb where 1 = 1 ";

            if (txtPCode1.Text.Trim() != "")
            {
                sql += " AND gzdd = rh_get_data('G','" + txtPCode1.Text.Trim() + "','','','') ";
            }
            else
            {
                sql += " AND GZDD = '' ";
            }

            DataTable dt = dc.GetTable(sql);

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