public void ElimiarCostoComida(DataTable dtbCostoComida) { ServicioProperTime.ServicioProperTimeClient objServicioProperTime; objServicioProperTime = new ServicioProperTime.ServicioProperTimeClient(); DataSet dtsDatos = new DataSet(); try { objServicioProperTime.Open(); dtbCostoComida.TableName = "CostoComida"; dtsDatos.Tables.Add(dtbCostoComida.Copy()); objServicioProperTime.EliminarCostoComida(dtsDatos); } catch (Exception ex) { throw ex; } finally { if (objServicioProperTime != null && objServicioProperTime.State == System.ServiceModel.CommunicationState.Opened) { objServicioProperTime.Close(); } } }
public void GestionarCostoComida(DataTable dtbTmp, DataTable dtbEliminados) { ServicioProperTime.ServicioProperTimeClient objServicioProperTime; objServicioProperTime = new ServicioProperTime.ServicioProperTimeClient(); DataSet dtsDatos = new DataSet(); try { objServicioProperTime.Open(); dtbTmp.TableName = "CostoComida"; dtsDatos.Tables.Add(dtbTmp.Copy()); objServicioProperTime.AdministrarCostoComida(dtsDatos); //**Envia los codigos de los elementos eliminados dtbEliminados.TableName = "CostoComidaEliminados"; dtsDatos = new DataSet(); dtsDatos.Tables.Add(dtbEliminados.Copy()); objServicioProperTime.EliminarCostoComida(dtsDatos); } catch (Exception ex) { throw ex; } finally { if (objServicioProperTime != null && objServicioProperTime.State == System.ServiceModel.CommunicationState.Opened) { objServicioProperTime.Close(); } } }