public void TraerRegistro(int n_IdRegistro) { CD_coo_servicios miFun = new CD_coo_servicios(); DataTable DtResul = new DataTable(); int n_row = 0; miFun.mysConec = mysConec; miFun.TraerRegistro(n_IdRegistro); if (miFun.booOcurrioError == false) { DtResul = miFun.dtServicios; if (DtResul.Rows.Count != 0) { entServicios.n_id = Convert.ToInt32(DtResul.Rows[0]["n_id"]); entServicios.n_idemp = Convert.ToInt32(DtResul.Rows[0]["n_idemp"]); entServicios.n_anotra = Convert.ToInt32(DtResul.Rows[0]["n_anotra"]); entServicios.n_mestra = Convert.ToInt32(DtResul.Rows[0]["n_mestra"]); entServicios.d_fchini = Convert.ToDateTime(DtResul.Rows[0]["d_fchini"]); entServicios.d_fchfin = Convert.ToDateTime(DtResul.Rows[0]["d_fchfin"]); entServicios.n_imptot = Convert.ToDouble(DtResul.Rows[0]["n_imptot"]); entServicios.c_obs = DtResul.Rows[0]["c_obs"].ToString(); entServicios.n_idtipser = Convert.ToInt32(DtResul.Rows[0]["n_idtipser"]); } DtResul = miFun.dtServiciosDet; lstServicios.Clear(); for (n_row = 0; n_row <= DtResul.Rows.Count - 1; n_row++) { BE_COO_SERVICIOSDET entServDet = new BE_COO_SERVICIOSDET(); entServDet.n_idser = Convert.ToInt32(DtResul.Rows[n_row]["n_idser"]); entServDet.n_idpue = Convert.ToInt32(DtResul.Rows[n_row]["n_idpue"]); entServDet.c_numlecini = DtResul.Rows[n_row]["c_numlecini"].ToString(); entServDet.c_numlecfin = DtResul.Rows[n_row]["c_numlecfin"].ToString(); entServDet.n_impcon = Convert.ToDouble(DtResul.Rows[n_row]["n_impcon"]); entServDet.c_obs = DtResul.Rows[n_row]["c_obs"].ToString(); lstServicios.Add(entServDet); } } else { booOcurrioError = miFun.booOcurrioError; StrErrorMensaje = miFun.StrErrorMensaje; IntErrorNumber = miFun.IntErrorNumber; } return; }
public bool Eliminar(int n_Idregistro) { bool b_result = false; CD_coo_servicios miFun = new CD_coo_servicios(); miFun.mysConec = mysConec; b_result = miFun.Eliminar(n_Idregistro); if (b_result == false) { booOcurrioError = miFun.booOcurrioError; StrErrorMensaje = miFun.StrErrorMensaje; IntErrorNumber = miFun.IntErrorNumber; } return(b_result); }
public bool Actualizar(BE_COO_SERVICIOS entServicios, List <BE_COO_SERVICIOSDET> LstServicioscab) { bool b_result = false; CD_coo_servicios miFun = new CD_coo_servicios(); miFun.mysConec = mysConec; b_result = miFun.Actualizar(entServicios, LstServicioscab); if (b_result == false) { booOcurrioError = miFun.booOcurrioError; StrErrorMensaje = miFun.StrErrorMensaje; IntErrorNumber = miFun.IntErrorNumber; } return(b_result); }
public void Consulta2(int n_IdEmpresa, int n_IdTipoServicio) { DataTable dtResul = new DataTable(); CD_coo_servicios miFun = new CD_coo_servicios(); miFun.mysConec = mysConec; miFun.Consulta2(n_IdEmpresa, n_IdTipoServicio); dtListar = miFun.dtListar; if (dtResul == null) { booOcurrioError = miFun.booOcurrioError; StrErrorMensaje = miFun.StrErrorMensaje; IntErrorNumber = miFun.IntErrorNumber; } return; }