Ejemplo n.º 1
0
        //查询计划log
        private void queryPlanLog()
        {
            //ASPxGridView grid = (ASPxGridView)sender;

            //string beginDate = ASPxDateEdit1.Date.ToString("yyyy/MM/dd");
            //日期格式大小写必须严格按yyyyMMdd
            string endDate = ASPxDateEdit2.Date.ToString("yyyyMMdd");
            string sql     = "SELECT A.* FROM DATA_PLANLOG A "
                             + " WHERE 1=1 "
                             //+ " AND BEGIN_DATE >= TO_DATE('" + beginDate + "','YYYY/MM/DD HH24:MI:SS')"
                             //+ " AND BEGIN_DATE <= TO_DATE('" + endDate + "','YYYY/MM/DD HH24:MI:SS')"
                             //ROUNTING_SITE对应原来的GZDD
                             + " AND A.ROUNTING_SITE IN (SELECT PLINE_CODE FROM VW_USER_ROLE_PROGRAM WHERE USER_ID = '"
                             + theUserId + "' AND PROGRAM_CODE = '" + theProgramCode + "' AND COMPANY_CODE = '" + theCompanyCode + "')"
                             + " AND PLAN_CODE LIKE 'E" + endDate + "%' "
                             + " ORDER BY A.CREATE_DATE, A.PLAN_CODE ";
            DataTable dt = dc.GetTable(sql);

            //这种方式还是不能分页
            //grid.DataSource = dt;
            //grid.DataBind();

            ASPxGridView4.DataSource = dt;
            ASPxGridView4.DataBind();
        }
Ejemplo n.º 2
0
    protected void btnXlsExport2_Click(object sender, EventArgs e)
    {
        string sql = Session["2800LINESIDE"].ToString();

        DataTable dt = dc.GetTable(sql);

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

        ASPxGridViewExporter2.WriteXlsToResponse("线边物料清单" + DateTime.Now.ToString() + ".xls");
    }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session.Contents["username"] == null)
     {
         Response.Redirect("~/Login.aspx");
     }
     if (!IsPostBack)
     {
         hdffile.Value = "";
         ASPxGridView2.DataBind();
         ASPxGridView4.DataBind();
         // ASPxGridView2.DetailRows.ExpandAllRows();
         // ASPxGridView4.DetailRows.ExpandAllRows();
     }
 }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ASPxGridView1.SettingsBehavior.AllowSelectByRowClick = true;
            ASPxGridView1.DataSource = Business.MediosPublicitarios.ReadAll("");
            ASPxGridView1.DataBind();

            ASPxGridView2.SettingsBehavior.AllowSelectByRowClick = true;
            ASPxGridView2.DataSource = Business.MediosPublicitarios.ReadAll("");
            ASPxGridView2.DataBind();

            ASPxGridView3.SettingsBehavior.AllowSelectByRowClick = true;
            ASPxGridView3.DataSource = Business.MediosPublicitarios.ReadAll("");
            ASPxGridView3.DataBind();

            ASPxGridView4.SettingsBehavior.AllowSelectByRowClick = true;
            ASPxGridView4.DataSource = Business.MediosPublicitarios.ReadAll("");
            ASPxGridView4.DataBind();
        }
Ejemplo n.º 5
0
 protected void ASPxGridView4_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
 {
     SqlDataSource5.DataBind();
     ASPxGridView4.DataBind();
 }
Ejemplo n.º 6
0
    private void setCondition()
    {
        //if (txtChose.Text.Trim() == "")
        //{
        //    return;
        //}
        //else
        //{
        string StationName = "";

        //    chose = txtChose.Value.ToString();
        if (txtPCode.Text.Trim() != "")
        {
            if (txtPCode.Text.Trim() == "东区")
            {
                StationName = "ZF200";
            }
            if (txtPCode.Text.Trim() == "西区")
            {
                StationName = "ATPU-U860";
            }



            MW_RST_MonthBB sp = new MW_RST_MonthBB()
            {
                ZDMC1        = StationName,
                GZRQ1        = ASPxDateEdit1.Text.Trim(),
                GZRQ2        = ASPxDateEdit2.Text.Trim(),
                MACHINENAME1 = MachineName
            };
            Procedure.run(sp);

            string    ChSql1 = "select distinct jhdm 计划代码,so 计划SO,ggxhmc 机型,sl 计划数量 ,wcsl 完成数量 from rstdaybb where machinename='" + MachineName + "'order by jhdm ";
            DataTable dt1    = dc.GetTable(ChSql1);

            ASPxGridView1.DataSource = dt1;

            ASPxGridView1.DataBind();
        }
        //int width = 40 / 5;
        // foreach (DevExpress.Web.ASPxGridView.GridViewColumn col in ASPxGridView1.VisibleColumns)
        // {
        //     col.Width = Unit.Percentage(width);
        //  }
        //DataTable Table1 = new DataTable();
        //Table1.Columns.Add("计划代码");
        //Table1.Columns.Add("计划SO");
        //Table1.Columns.Add("机型");
        //Table1.Columns.Add("计划数量");
        //Table1.Columns.Add("完成数量");

        //for (int i = 0; i < dt1.Rows.Count; i++)
        //{
        //    string jhdm = dt1.Rows[i][0].ToString();
        //    string so = dt1.Rows[i][1].ToString();
        //    string ggxhmc = dt1.Rows[i][2].ToString();
        //    string sl = dt1.Rows[i][3].ToString();
        //    string wcsl = dt1.Rows[i][4].ToString();
        //    Table1.Rows.Add(jhdm, so, ggxhmc, sl, wcsl);
        //}

        //ASPxGridView1.DataSource = Table1;
        //ASPxGridView1.DataBind();
        if (txtPCode2.Text.Trim() != "")
        {
            if (txtPCode2.Text.Trim() == "东区")
            {
                StationName = "ZF200";
            }
            if (txtPCode2.Text.Trim() == "西区")
            {
                StationName = "ATPU-U860";
            }
            string ChSql2 = " select WORK_DATE 工作日期, PLAN_SO 产品代码,count(distinct SN) 完成数量 from VW_DATA_COMPLETE a left join code_station b on a.station_code=b.station_code "
                            + "where b.station_name='" + StationName + "'and WORK_DATE>=to_date('" + ASPxDateEdit3.Text.Trim() + "','yyyy-mm-dd hh24:mi:ss')" + " and WORK_DATE<=to_date('" + ASPxDateEdit4.Text.Trim() + "','yyyy-mm-dd hh24:mi:ss') group by a.work_date ,a.plan_so";

            DataTable dt2 = dc.GetTable(ChSql2);
            ASPxGridView2.DataSource = dt2;
            ASPxGridView2.DataBind();
        }
        if (txtPCode3.Text.Trim() != "")
        {
            if (txtPCode3.Text.Trim() == "东区")
            {
                StationName = "ZF200";
            }
            if (txtPCode3.Text.Trim() == "西区")
            {
                StationName = "ATPU-U860";
            }
            MW_CREATE_ZDLSHTJ sp2 = new MW_CREATE_ZDLSHTJ()
            {
                GZRQ1 = ASPxDateEdit5.Date,
                GZRQ2 = ASPxDateEdit6.Date,
                GZDD1 = txtPCode3.Value.ToString()
            };
            Procedure.run(sp2);
            string    ChSql3 = "SELECT GHTM 漏扫条码,ZDMC 工位号    FROM ATPUZDLSHQD ORDER BY GHTM";
            DataTable dt3    = dc.GetTable(ChSql3);

            ASPxGridView3.DataSource = dt3;
            ASPxGridView3.DataBind();
        }
        if (txtPCode4.Text.Trim() != "")
        {
            if (txtPCode4.Text.Trim() == "东区")
            {
                StationName = "ZF200";
            }
            if (txtPCode4.Text.Trim() == "西区")
            {
                StationName = "ATPU-U860";
            }
            //与原程序多调用了一次存储过程,因为分了两个页面查询
            MW_CREATE_ZDLSHTJ sp3 = new MW_CREATE_ZDLSHTJ()
            {
                GZRQ1 = ASPxDateEdit5.Date,
                GZRQ2 = ASPxDateEdit6.Date,
                GZDD1 = txtPCode3.Value.ToString()
            };
            Procedure.run(sp3);
            string    ChSql4 = "SELECT ZDMC 工位,AA 漏扫数量 FROM (select ZDMC,ZDDM,COUNT(*) AA from ATPUZDLSHQD GROUP BY ZDMC,ZDDM ) ORDER BY ZDDM";
            DataTable dt4    = dc.GetTable(ChSql4);
            ASPxGridView4.DataSource = dt4;
            ASPxGridView4.DataBind();
        }
        //ASPxGridView1.JSProperties.Add("cpCallbackName", "Fail");
        //ASPxGridView1.JSProperties.Add("cpCallbackRet", "统计方式有误!");
    }