Precio minimo anterior en actualizar precios y evitar cerrar ventana en shipments

This commit is contained in:
2019-08-21 12:51:36 -07:00
parent dfaf5e12fc
commit 60a585029e
6 changed files with 8744 additions and 8968 deletions

View File

@@ -154,34 +154,41 @@ public partial class GPS_Shipments : ClsPaginas
}
protected void LnkAddStop_Click(object sender, EventArgs e)
{
if (DtStops != null)
{
var Row = DtStops.NewRow();
Row["StopSequence"] = DtStops.Rows.Count + 1;
Row["Name"] = TxtLocName.Text.Trim();
Row["LocationID"] = TxtLocID.Text.Trim();
Row["StopType"] = DdlStopType.SelectedValue;
Row["StopRole"] = DdlStopRole.SelectedValue;
Row["EarlyArrivalTime"] = TxtFechaStopI.Text.ToDateTime();
Row["LateArrivalTime"] = TxtFechaStopF.Text.ToDateTime();
Row["Address"] = TxtAddress.Text.Trim();
Row["City"] = TxtCity.Text.Trim();
Row["State"] = TxtState.Text.Trim();
Row["PostalCode"] = TxtPostalCode.Text.Trim();
Row["Country"] = TxtContry.Text.Trim();
var latlon = TxtLatLong.Text.Trim().Split(',');
Row["Lat"] = latlon[0];
Row["Lon"] = latlon[1];
DtStops.Rows.Add(Row);
try
{
if (DtStops != null)
{
var Row = DtStops.NewRow();
Row["StopSequence"] = DtStops.Rows.Count + 1;
Row["Name"] = TxtLocName.Text.Trim();
Row["LocationID"] = TxtLocID.Text.Trim();
Row["StopType"] = DdlStopType.SelectedValue;
Row["StopRole"] = DdlStopRole.SelectedValue;
Row["EarlyArrivalTime"] = TxtFechaStopI.Text.ToDateTime();
Row["LateArrivalTime"] = TxtFechaStopF.Text.ToDateTime();
Row["Address"] = TxtAddress.Text.Trim();
Row["City"] = TxtCity.Text.Trim();
Row["State"] = TxtState.Text.Trim();
Row["PostalCode"] = TxtPostalCode.Text.Trim();
Row["Country"] = TxtContry.Text.Trim();
var latlon = TxtLatLong.Text.Trim().Split(',');
Row["Lat"] = latlon[0];
Row["Lon"] = latlon[1];
DtStops.Rows.Add(Row);
}
GvStops.DataSource = DtStops;
GvStops.DataBind();
UpShipment.Update();
}
catch (Exception ex)
{
this.OnError("Ocurrió un error al registrar la parada (stop)", ex);
}
GvStops.DataSource = DtStops;
GvStops.DataBind();
UpShipment.Update();
this.RegistraScript("$('#DivStop').modal('hide');");
}