예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Server.Transfer("login.aspx");
            }
            //const string _op3 = "select \"DocNum\" as OF1, \"StartDate\" as FechaProgramada, DAYS_BETWEEN(\"StartDate\", CURRENT_DATE) as DiasAbierta, CASE \"Status\" When 'C' Then 'Cancelada' When 'R' Then 'Liberada' When 'L' Then 'Cerrada' When 'P'  Then 'Planificada' END as Estado,\"ProdName\" as Especie, \"ProdName\" as Articulo, \"PlannedQty\" as Planificado,  'orden.aspx?' as url from  \"SBO04DEMOPROCESADORA\".\"OWOR\" where \"Status\" = 'R'";

            if (!IsPostBack)
            {
                DrpListOrden.Items.Clear();
                cUsuario Usuario = (cUsuario)Session["Usuario"];

                DataTable  Ordenes = new DataTable();
                cRecordSet cOrd    = new cRecordSet();

                Ordenes = cOrd.clsResumenOF(3, Usuario);

                if (Ordenes.Rows.Count > 0)
                {
                    foreach (DataRow row in Ordenes.Rows)
                    {
                        ListItem i;
                        i = new ListItem(row["OF1"].ToString() + " / " + row["ESPECIE"].ToString(), row["DocEntry"].ToString());
                        DrpListOrden.Items.Add(i);
                    }
                }
            }
            txtConsumoLote.Focus();
        }
예제 #2
0
        public clsResumenOF(SAPbobsCOM.Company Empresa, string BD)
        {
            cRecordSet rs = new cRecordSet("select * from \"" + BD + "\".\"OWOR\" ", Empresa);

            if (rs.RS.RecordCount > 0)
            {
                this.Ofs = rs.RS.RecordCount;
            }

            cRecordSet rs1 = new cRecordSet("select * from \"" + BD + "\".\"OWOR\" where \"Status\"='L' ", Empresa);

            if (rs1.RS.RecordCount > 0)
            {
                this.Cerradas = rs1.RS.RecordCount;
            }

            cRecordSet rs2 = new cRecordSet("select * from \"" + BD + "\".\"OWOR\" where \"Status\"='R' ", Empresa);

            if (rs2.RS.RecordCount > 0)
            {
                this.Abiertas = rs2.RS.RecordCount;
            }

            cRecordSet rs3 = new cRecordSet("select * from \"" + BD + "\".\"OWOR\" where \"Status\"='P' ", Empresa);

            if (rs3.RS.RecordCount > 0)
            {
                this.SinHoras = rs3.RS.RecordCount;
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Server.Transfer("login.aspx");
            }
            //const string _op3 = "select \"DocNum\" as OF1, \"StartDate\" as FechaProgramada, DAYS_BETWEEN(\"StartDate\", CURRENT_DATE) as DiasAbierta, CASE \"Status\" When 'C' Then 'Cancelada' When 'R' Then 'Liberada' When 'L' Then 'Cerrada' When 'P'  Then 'Planificada' END as Estado,\"ProdName\" as Especie, \"ProdName\" as Articulo, \"PlannedQty\" as Planificado,  'orden.aspx?' as url from  \"SBO04DEMOPROCESADORA\".\"OWOR\" where \"Status\" = 'R'";
            DataTable Dt = new DataTable();

            cUsuario Usuario = (cUsuario)Session["Usuario"];
            int      _Opcion;

            _Opcion = int.Parse(Request.QueryString["vOp"]);

            GridResumen.Columns[0].ItemStyle.Width = 100;
            GridResumen.Columns[1].ItemStyle.Width = 170;
            GridResumen.Columns[2].ItemStyle.Width = 80;
            GridResumen.Columns[3].ItemStyle.Width = 100;
            GridResumen.Columns[4].ItemStyle.Width = 110;
            GridResumen.Columns[5].ItemStyle.Width = 400;
            GridResumen.Columns[6].ItemStyle.Width = 90;
            lblProceso.Text = "Ordenes de Fabricacion";

            switch (_Opcion)
            {
            case 1:
                lblprocesoDesc.Text = "* todas *";
                break;

            case 2:
                lblprocesoDesc.Text = "* cerradas *";
                break;

            case 3:
                lblprocesoDesc.Text = "* abiertas *";
                break;

            case 4:
                lblprocesoDesc.Text = "* planificadas *";
                break;
            }

            cRecordSet rs2 = new cRecordSet();

            GridResumen.DataSource = rs2.clsResumenOF(_Opcion, Usuario);
            GridResumen.DataBind();
        }