Esempio n. 1
0
 protected void GVStockNegativo_Sorting(object sender, GridViewSortEventArgs e)
  {
      if (OrderField == e.SortExpression)
          ChangeOrder();
      OrderField = e.SortExpression;
      List<AlertProduct> lstStockNegativo = ControllerManager.AlertProduct.ShowAlert(OrderField, sortOrder, 1);
      GVStockNegativo.DataSource = lstStockNegativo;
      GVStockNegativo.DataBind();
      pnStockNegativo.Visible = true;
      lblTotalCountAlert3.Text = "Total: " + lstStockNegativo.Count + " registros";
   }
Esempio n. 2
0
        protected void GVStockNegativo_Sorting(object sender, GridViewSortEventArgs e)
        {
            if (OrderField == e.SortExpression)
            {
                ChangeOrder();
            }
            OrderField = e.SortExpression;
            List <AlertProduct> lstStockNegativo = ControllerManager.AlertProduct.ShowAlert(OrderField, sortOrder, 1);

            GVStockNegativo.DataSource = lstStockNegativo;
            GVStockNegativo.DataBind();
            GVStockNegativo.Enabled = true;
        }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ViewState["sortOrder"] = "";
     }
     if (Request.QueryString["alert"] != null)
     {
         List<Provider> providers = ControllerManager.Provider.GetFullProviderList();
         switch (Request.QueryString["alert"])
         {
             case "1":
                 {
                     lblAlertName.Text = "Seguimiento de Ordenes de Compra";
                     DateTime? from;
                     DateTime? until;
                     bool? license;
                     WayOfDelivery? wayOfDelivery;
                     AlertPurchaseOrderType? type = GetAlert1Filters(out from, out until, out license, out wayOfDelivery);
                     List<AlertPurchaseOrder> lstConfNoEntregadas = ControllerManager.AlertPurchaseOrder.Search(type, txtProvider.Text, txtProduct.Text, txtPurchaseOrder.Text, from, until, license, OrderField, sortOrder, wayOfDelivery);
                     GVSeguimientoOc.DataSource = lstConfNoEntregadas;
                     GVSeguimientoOc.DataBind();
                     pnSeguimientoOc.Visible = true;
                     btnExportToExcel.Visible = (lstConfNoEntregadas.Count > 0);
                     Form.DefaultButton = btnAlert1Search.UniqueID;
                     lblTotalCountAlert1.Text = "Total: " + lstConfNoEntregadas.Count + " registros";
                     break;
                 }
             case "3":
                 {
                     lblAlertName.Text = "Productos con Stock Negativo";
                     List<AlertProduct> lstStockNegativo = ControllerManager.AlertProduct.ShowAlert(OrderField, sortOrder, 1);
                     GVStockNegativo.DataSource = lstStockNegativo;
                     GVStockNegativo.DataBind();
                     pnStockNegativo.Visible = true;
                     btnExportToExcel.Visible = (lstStockNegativo.Count > 0);
                     lblTotalCountAlert3.Text = "Total: " + lstStockNegativo.Count + " registros";
                     break;
                 }
             case "4":
                 {
                     lblAlertName.Text = "Seguimiento de Entregas";
                     if (Page.Request.Form.HasKeys())
                     {
                         Alert4Search(Page.Request.Form.Get("ctl00$cphContent$ddlClient"), OrderField);
                         pnSeguimientoOv.Visible = true;
                     }
                     else
                     {
                         List<AlertSaleOrder> lstNoCumplimentadas = ControllerManager.AlertSaleOrder.ShowAlert4();
                         FillAlert4(lstNoCumplimentadas, string.Empty);
                     }
                     Form.DefaultButton = btnAlert4Search.UniqueID;
                     break;
                 }
             case "6":
                 {
                     lblAlertName.Text = "Nivel de Reposición";
                     GVRepositionFill();
                     break;
                 }
         }
     }
 }
Esempio n. 4
0
 protected void GVStockNegativo_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GVStockNegativo.PageIndex = e.NewPageIndex;
     GVStockNegativo.DataBind();
 }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ViewState["sortOrder"] = "";
            }

            if (Request.QueryString["alert"] != null)
            {
                List <Provider> providers = ControllerManager.Provider.GetFullProviderList();
                switch (Request.QueryString["alert"])
                {
                case "1":
                {
                    lblAlertName.Text = "OC Confirmadas y No Entregadas";
                    List <AlertPurchaseOrder> lstConfNoEntregadas = ControllerManager.AlertPurchaseOrder.ShowAlert1();
                    foreach (AlertPurchaseOrder order in lstConfNoEntregadas)
                    {
                        Provider provtemp = providers.Find(delegate(Provider record)
                            {
                                if (record.ProviderCode == order.PurchaseOrderProviderCode)
                                {
                                    return(true);
                                }
                                return(false);
                            });
                        if (provtemp != null)
                        {
                            order.PurchaseOrderProviderName = provtemp.Name;
                        }
                    }
                    GVOcConfirmadasNoEntregadas.DataSource = lstConfNoEntregadas;
                    GVOcConfirmadasNoEntregadas.DataBind();
                    GVOcConfirmadasNoEntregadas.Enabled = true;
                    btnExportToExcel.Visible            = (lstConfNoEntregadas.Count > 0);
                    break;
                }

                case "2":
                {
                    lblAlertName.Text = "OC No Confirmadas";
                    List <AlertPurchaseOrder> lstNoConfirmadas = ControllerManager.AlertPurchaseOrder.ShowAlert2();
                    foreach (AlertPurchaseOrder order in lstNoConfirmadas)
                    {
                        Provider provtemp = providers.Find(delegate(Provider record)
                            {
                                if (record.ProviderCode == order.PurchaseOrderProviderCode)
                                {
                                    return(true);
                                }
                                return(false);
                            });
                        if (provtemp != null)
                        {
                            order.PurchaseOrderProviderName = provtemp.Name;
                        }
                    }
                    GVOcNoConfirmadas.DataSource = lstNoConfirmadas;
                    GVOcNoConfirmadas.DataBind();
                    GVOcNoConfirmadas.Enabled = true;
                    btnExportToExcel.Visible  = (lstNoConfirmadas.Count > 0);
                    break;
                }

                case "3":
                {
                    lblAlertName.Text = "Productos con Stock Negativo";
                    List <AlertProduct> lstStockNegativo = ControllerManager.AlertProduct.ShowAlert3();
                    GVStockNegativo.DataSource = lstStockNegativo;
                    GVStockNegativo.DataBind();
                    GVStockNegativo.Enabled  = true;
                    btnExportToExcel.Visible = (lstStockNegativo.Count > 0);
                    break;
                }

                case "4":
                {
                    lblAlertName.Text = "OV no Cumplimentadas";
                    List <AlertSaleOrder> lstNoCumplimentadas = ControllerManager.AlertSaleOrder.ShowAlert4();
                    GVNoCumplimentadas.DataSource = lstNoCumplimentadas;
                    GVNoCumplimentadas.DataBind();
                    GVNoCumplimentadas.Enabled = true;
                    btnExportToExcel.Visible   = (lstNoCumplimentadas.Count > 0);
                    break;
                }

                case "5":
                {
                    lblAlertName.Text = "Stock que caera del Safety";
                    List <AlertProduct> lstStockMenorSafety = ControllerManager.AlertProduct.ShowAlert5();
                    GVStockMenorSafety.DataSource = lstStockMenorSafety;
                    GVStockMenorSafety.DataBind();
                    GVStockMenorSafety.Enabled = true;
                    btnExportToExcel.Visible   = (lstStockMenorSafety.Count > 0);
                    break;
                }

                case "6":
                {
                    lblAlertName.Text = "Diferencia en Nivel de Reposición";
                    List <AlertReposition> lstReposicionDife = ControllerManager.AlertReposition.ShowAlert(OrderField, sortOrder);
                    GVReposicionDiferente.DataSource = lstReposicionDife;
                    GVReposicionDiferente.DataBind();
                    GVReposicionDiferente.Enabled = true;
                    btnExportToExcel.Visible      = (lstReposicionDife.Count > 0);
                    break;
                }
                }
            }
        }