agregando las entregas locales
This commit is contained in:
127
General/PopUpPaqueteriasGuiasInternas.aspx
Normal file
127
General/PopUpPaqueteriasGuiasInternas.aspx
Normal file
@@ -0,0 +1,127 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="PopUpPaqueteriasGuiasInternas.aspx.cs" Inherits="General_PopUpPaqueteriasGuiasInternas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<style>
|
||||
.MultiLineTextBox {
|
||||
resize: none;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.posicionvalidation {
|
||||
left: 530px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<%--Paqueterías Guías--%>Entrega Interna
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPGuiasVinculadas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="Widthall">
|
||||
<tr>
|
||||
<td class="Titulos"><%--Guías Vinculadas--%> Entrega Local</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UPGuiasPorVincular" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="Widthall">
|
||||
|
||||
|
||||
<tr runat="server" id="RowPaqueteria" align="left" visible="true">
|
||||
<td class="text-right"><b>Estatus:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px">
|
||||
<%-- <asp:ListItem Selected="False" Text="Seleccione" Value="-1"></asp:ListItem>--%>
|
||||
<asp:ListItem Selected="True" Text="En Proceso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Confirmado por Proveedor" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Entregado" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Confirmado por Cliente" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVDdlEstatus" runat="server" ControlToValidate="DdlEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario." InitialValue="-1" ValidationGroup="GrpCrearGuia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDdlEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlEstatus" Width="250px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="RowRastreo" align="left" visible="true">
|
||||
<td class="text-right" style="width: 140px"><b>Fecha:</b></td>
|
||||
<td style="width: 200px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 117px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" Width="170px" Height="30px" Style="padding: 0px" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server" Width="30px"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="LnkFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario." ValidationGroup="GrpCrearGuia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFecha" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="250px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="RowFechas" align="left" visible="true">
|
||||
|
||||
<td class="text-right" style="width: 140px;"><b>Fecha Estimada:</b></td>
|
||||
<td style="width: 200px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 117px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaEstimada" runat="server" CssClass="form-control" Width="170px" Height="30px" Style="padding: 0px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaEstimada" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server" Width="30px"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaEstimada" runat="server" TargetControlID="TxtFechaEstimada" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEstimada" TargetControlID="TxtFechaEstimada" PopupButtonID="LnkFechaEstimada" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="RowDimensiones" align="left" visible="true">
|
||||
<td class="text-right" style="width: 140px"><b># Cajas:</b></td>
|
||||
<td style="width: 200px">
|
||||
<asp:TextBox ID="TxtNoCajas" runat="server" CssClass="form-control" Width="200px" Height="30px" Style="padding: 0px"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEENoCajas" runat="server" TargetControlID="TxtNoCajas" Mask="9999" MaskType="Number" AcceptNegative="None"></ajax:MaskedEditExtender>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="RowCajas" align="left" visible="true">
|
||||
<td class="text-right" align="left" valign="top" style="width: 140px; padding-top: 4px;"><b>Observaciones:</b></td>
|
||||
<td style="width: 200px;">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" CssClass="form-control MultiLineTextBox" Width="200px" Height="60px" Style="padding: 0px" TextMode="MultiLine"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr></tr>
|
||||
|
||||
<tr align="center">
|
||||
<td style="text-align: right; width: 135px;" colspan="2">
|
||||
<asp:Button ID="BtnCrearGuia" runat="server" Text="Crear Guía" class="btn btn-primary" Width="135px" Visible="true" OnClick="BtnCrearGuia_Click" ValidationGroup="GrpCrearGuia" />
|
||||
|
||||
</td>
|
||||
<td style="text-align: left; width: 135px;" colspan="2">
|
||||
<asp:Button ID="BtnLimpiar" runat="server" Text="Limpiar Campos" class="btn btn-warning" Width="135px" Visible="true" OnClick="BtnLimpiar_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
136
General/PopUpPaqueteriasGuiasInternas.aspx.cs
Normal file
136
General/PopUpPaqueteriasGuiasInternas.aspx.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
public partial class General_PopUpPaqueteriasGuiasInternas : ClsPaginas
|
||||
{
|
||||
private int CveVenta
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveVenta"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveVenta"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int CveSubProyecto
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveSubProyecto"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveSubProyecto"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
((BaseMasterPage)this.Master).EsPopup = true;
|
||||
RecuperaCve();
|
||||
}
|
||||
}
|
||||
|
||||
protected void RecuperaCve()
|
||||
{
|
||||
if (Request["CveVenta"] != null && !Request["CveVenta"].ToString().Equals("") && Request["CveVenta"].ToEntero() > 0)
|
||||
{
|
||||
ViewState["CveVenta"] = Request["CveVenta"];
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["CveVenta"] = -1;
|
||||
}
|
||||
|
||||
if (Request["CveSubProyecto"] != null && !Request["CveSubProyecto"].ToString().Equals("") && Request["CveSubProyecto"].ToEntero() > 0)
|
||||
{
|
||||
ViewState["CveSubProyecto"] = Request["CveSubProyecto"];
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["CveSubProyecto"] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
protected void LimpiaCampos()
|
||||
{
|
||||
DdlEstatus.SelectedValue = "1";
|
||||
TxtFecha.Text = "";
|
||||
TxtFechaEstimada.Text = "";
|
||||
TxtNoCajas.Text = "";
|
||||
TxtObservaciones.Text = "";
|
||||
}
|
||||
|
||||
protected void AgregarNuevaGuia()
|
||||
{
|
||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||
|
||||
Boolean TieneError = false;
|
||||
|
||||
ObjGeneral.IniciaTransacSQL();
|
||||
|
||||
int CveEstatus = DdlEstatus.SelectedValue.ToEntero();
|
||||
|
||||
String Fecha = TxtFecha.Text;
|
||||
String FechaEstimada = TxtFechaEstimada.Text == "" ? "-1" : TxtFechaEstimada.Text;
|
||||
|
||||
int NoCajas = TxtNoCajas.Text.ToEntero();
|
||||
|
||||
String Observaciones = TxtObservaciones.Text;
|
||||
|
||||
int CvePaqueteriaGuia = ObjGeneral.AddPaqueteriasGuias(-1, -1, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:true);
|
||||
|
||||
if (CvePaqueteriaGuia > 0)
|
||||
{
|
||||
if (CveVenta > 0 || CveSubProyecto > 0 )
|
||||
{
|
||||
TieneError = !ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVenta, -1, CveSubProyecto, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TieneError = true;
|
||||
}
|
||||
|
||||
if (TieneError)
|
||||
{
|
||||
ObjGeneral.RollBack();
|
||||
}else
|
||||
{
|
||||
ObjGeneral.Commit();
|
||||
LimpiaCampos();
|
||||
Alert("Se agrego la paquetería guía correctamente");
|
||||
}
|
||||
ObjGeneral.Dispose();
|
||||
}
|
||||
|
||||
public void BtnAgregarGuia_Click(Object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void BtnCrearGuia_Click(Object sender, EventArgs e)
|
||||
{
|
||||
AgregarNuevaGuia();
|
||||
}
|
||||
|
||||
public void BtnLimpiar_Click(Object sender,EventArgs e)
|
||||
{
|
||||
LimpiaCampos();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user