Ejemplo n.º 1
0
 protected void ASPxGridView2_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
 {
     SqlDataSource1.DataBind();
     ASPxGridView1.DataBind();
     SqlDataSource13.DataBind();
     ASPxGridView3.DataBind();
     SqlDataSource15.DataBind();
     ASPxGridView5.DataBind();
     SqlDataSource8.DataBind();
     ASPxGridView7.DataBind();
 }
Ejemplo n.º 2
0
    protected void btnXlsExport3_Click(object sender, EventArgs e)
    {
        string sql = Session["2800COMPARE"].ToString();

        DataTable dt = dc.GetTable(sql);

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

        ASPxGridViewExporter3.WriteXlsToResponse("在制品物料清单导出" + DateTime.Now.ToString() + ".xls");
    }
Ejemplo n.º 3
0
    protected void setCondition()
    {
        string sql = "SELECT STATION_NAME,DETECT_NAME,case WHEN STATION_NAME='ZF160' and DETECT_VALUE='1' THEN '合格' when STATION_NAME='ZF160' and DETECT_VALUE='0' THEN '不合格' when DETECT_NAME='连杆大头侧隙' and DETECT_VALUE='1' then '合格' "
                     + " when DETECT_NAME='连杆大头侧隙' and DETECT_VALUE='0' then '不合格' else DETECT_VALUE end DETECT_VALUE from VW_DATA_SN_DETECT_DATA where SN='" + txtSN.Text.Trim() + "' ORDER BY STATION_NAME,DETECT_CODE";
        DataTable dt = dc.GetTable(sql);

        ASPxGridView6.DataSource = dt;
        ASPxGridView6.DataBind();
        string    sql1 = " SELECT DISTINCT * FROM DATA_SN_FAULT where SN='" + txtSN.Text.Trim() + "'";
        DataTable dt1  = dc.GetTable(sql1);

        //ASPxGridView?.DataSource = dt1;//dgRst2
        //ASPxGridView?.DataBind();


        string    sql2 = " SELECT a.* FROM vw_data_complete a where a.sn='" + txtSN.Text.Trim() + "' order by a.start_time,a.station_name";
        DataTable dt2  = dc.GetTable(sql2);

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

        string sql3 = " SELECT ghtm 流水号,rqsj 打印时间,jx 机型,bzso 标准so,gl 功率,qfjq 进阀进气,qfpq 进阀排气,pl 排量,xl 系列,ds 怠速,fhcx 发火次序,xnbh 性能表号,dyjx 打印机型,zs 转速 FROM sjenameplate where ghtm='" + txtSN.Text.Trim() + "'"
                      + " union SELECT ghtm 流水号,rqsj1  打印时间,jx 机型,bzso 标准so,gl 功率,qfjq 进阀进气,qfpq 进阀排气,pl 排量,xl 系列,ds 怠速,fhcx 发火次序,xnbh 性能表号,dyjx 打印机型,zs 转速 from sjchgnmplt where ghtm='" + txtSN.Text.Trim() + "'";
        DataTable dt3 = dc.GetTable(sql3);

        ASPxGridView7.DataSource = dt3;
        ASPxGridView7.DataBind();

        //string sql4 = "SELECT * FROM NJJ_TEST_DETAIL where ghtm='" + txtSN2.Text.Trim() + "'";
        //DataTable dt4 = dc.GetTable(sql4);
        //ASPxGridView2.DataSource = dt4;
        //ASPxGridView2.DataBind();


        //string sql5 = "SELECT * from FZSJCLB where ghtm='" + txtSN3.Text.Trim() + "' ORDER BY zdmc,xmdm";
        //DataTable dt5 = dc.GetTable(sql5);
        //ASPxGridView3.DataSource = dt5;
        //ASPxGridView3.DataBind();


        //string sql6 = "SELECT * FROM JWTCM WHERE GHTM='" + txtSN4.Text.Trim() + "'";
        //DataTable dt6 = dc.GetTable(sql6);
        //ASPxGridView4.DataSource = dt6;
        //ASPxGridView4.DataBind();

        string sql7 = "SELECT a.SN 流水号,a.station_name 站点,to_char(a.create_time,'YYYY-MM-DD HH24:MI:SS') 扫描时间, b.user_name 员工,a.pline_code 地点,a.item_code 零件号,a.item_name  零件名称,a.vendor_code 供应商,c.fr ,"
                      + " case a.ITEM_TYPE WHEN 'A' THEN  (a.ITEM_CODE||'^'||a.VENDOR_CODE||'^'||a.ITEM_BATCH) when 'B'   THEN   (a.ITEM_CODE||'^'||a.VENDOR_CODE||'^'||a.ITEM_SN) "
                      + " else a.ITEM_TYPE end 条码  FROM vw_data_sn_bom_and_temp a left join code_user b on a.CREATE_USERID=b.USER_CODE  left join atpuplannameplate c on a.PLAN_CODE=c.plan_code  WHERE a.SN='" + txtSN5.Text.Trim() + "'";
        DataTable dt7 = dc.GetTable(sql7);

        ASPxGridView5.DataSource = dt7;
        ASPxGridView5.DataBind();
    }
Ejemplo n.º 4
0
    protected void setCondition()
    {
        string sql = "SELECT STATION_NAME,DETECT_NAME,case WHEN STATION_NAME='ZF160' and DETECT_VALUE='1' THEN '合格' when STATION_NAME='ZF160' and DETECT_VALUE='0' THEN '不合格' when DETECT_NAME='连杆大头侧隙' and DETECT_VALUE='1' then '合格' "
                     + " when DETECT_NAME='连杆大头侧隙' and DETECT_VALUE='0' then '不合格' else DETECT_VALUE end DETECT_VALUE from VW_DATA_SN_DETECT_DATA where SN='" + txtSN.Text.Trim() + "' ORDER BY STATION_NAME,DETECT_CODE";
        DataTable dt = dc.GetTable(sql);

        ASPxGridView6.DataSource = dt;
        ASPxGridView6.DataBind();
        string    sql1 = " SELECT DISTINCT * FROM DATA_SN_FAULT where SN='" + txtSN.Text.Trim() + "'";
        DataTable dt1  = dc.GetTable(sql1);

        string    sql2 = " SELECT a.* FROM vw_data_complete a where a.sn='" + txtSN.Text.Trim() + "' order by a.start_time,a.station_name";
        DataTable dt2  = dc.GetTable(sql2);

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

        string sql3 = " SELECT ghtm 流水号,rqsj 打印时间,jx 机型,bzso 标准so,gl 功率,qfjq 进阀进气,qfpq 进阀排气,pl 排量,xl 系列,ds 怠速,fhcx 发火次序,xnbh 性能表号,dyjx 打印机型,zs 转速 FROM sjenameplate where ghtm='" + txtSN.Text.Trim() + "'"
                      + " union SELECT ghtm 流水号,rqsj1  打印时间,jx 机型,bzso 标准so,gl 功率,qfjq 进阀进气,qfpq 进阀排气,pl 排量,xl 系列,ds 怠速,fhcx 发火次序,xnbh 性能表号,dyjx 打印机型,zs 转速 from sjchgnmplt where ghtm='" + txtSN.Text.Trim() + "'";
        DataTable dt3 = dc.GetTable(sql3);

        ASPxGridView7.DataSource = dt3;
        ASPxGridView7.DataBind();

        //string sql4 = "SELECT * FROM NJJ_TEST_DETAIL where ghtm='" + txtSN2.Text.Trim() + "'";
        //DataTable dt4 = dc.GetTable(sql4);
        //ASPxGridView2.DataSource = dt4;
        //ASPxGridView2.DataBind();


        //string sql5 = "SELECT * from FZSJCLB where ghtm='" + txtSN3.Text.Trim() + "' ORDER BY zdmc,xmdm";
        //DataTable dt5 = dc.GetTable(sql5);
        //ASPxGridView3.DataSource = dt5;
        //ASPxGridView3.DataBind();


        //string sql6 = "SELECT * FROM JWTCM WHERE GHTM='" + txtSN4.Text.Trim() + "'";
        //DataTable dt6 = dc.GetTable(sql6);
        //ASPxGridView4.DataSource = dt6;
        //ASPxGridView4.DataBind();

        if (Session["rept1400_SN"] as string != null)
        {
            string sn = Session["rept1400_SN"].ToString();

            string sql7 = "SELECT a.SN 流水号,a.station_name 站点,to_char(a.create_time,'YYYY-MM-DD HH24:MI:SS') 扫描时间, b.user_name 员工,a.pline_code 地点,a.item_code 零件号,a.item_sn 零件流水号,a.item_name  零件名称,a.item_vendor 供应商, "
                          + " barcode 条码  FROM data_scan_item a left join code_user b on a.CREATE_USERID=b.USER_CODE   WHERE a.SN='" + sn + "'  and machinename='" + MachineName + "' and  item_type!='C'";
            DataTable dt7 = dc.GetTable(sql7);
            ASPxGridView5.DataSource = dt7;
            ASPxGridView5.DataBind();
        }
    }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session.Contents["username"] == null)
     {
         Response.Redirect("~/Login.aspx");
     }
     //  GridViewFeaturesHelper.SetupGlobalGridViewBehavior(ASPxGridView1);
     if (!IsPostBack)
     {
         hdfmaquanly.Value  = "0";
         hdfmaquanly1.Value = "0";
         ASPxGridView1.DataBind();
         // ASPxGridView1.DetailRows.ExpandRow(0);
         ASPxGridView3.DataBind();
         //  ASPxGridView3.DetailRows.ExpandAllRows();
         ASPxGridView5.DataBind();
         //   ASPxGridView5.DetailRows.ExpandAllRows();
     }
 }