public int GetfnIDFactura(int company, int inumero) { IntegraData.InvoiceDAL InvoiceDAL = new IntegraData.InvoiceDAL(); DataTable table = new DataTable(); try { using (table = InvoiceDAL.GetfnIDFactura(company, inumero)) { if (table.Rows.Count > 0) { if (table.Rows[0][0] != DBNull.Value) { return(Convert.ToInt32(table.Rows[0][0])); } } } } catch { return(0); } finally { InvoiceDAL = null; } return(0); }
public int GetInvoiceNumber(int company, int salenumber) { DataTable table = new DataTable(); IntegraData.InvoiceDAL InvoiceDAL = new IntegraData.InvoiceDAL(); try { using (table = ObtieneNumeroFactura(company, salenumber)) { if (table.Rows.Count > 0) { if (table.Rows[0][0] != DBNull.Value) { return(Convert.ToInt32(table.Rows[0][0])); } } } } catch { throw; } finally { InvoiceDAL = null; } return(0); }
public int GetFnFacturaConcepto(int company, int?iSucursal) { IntegraData.InvoiceDAL InvoiceDAL = new IntegraData.InvoiceDAL(); DataTable table = new DataTable(); try { using (table = InvoiceDAL.GetFnFacturaConcepto(company, iSucursal)) { if (table.Rows.Count > 0) { if (table.Rows[0][0] != DBNull.Value) { return(Convert.ToInt32(table.Rows[0][0])); } } } } catch { return(0); } finally { InvoiceDAL = null; } return(0); }
public int CreateInvoiceFacturasProgramadas(int company, int salenumber, int document, int serie, int folio, DateTime date, int client, int iParcialTotal, int iAnticipo) { IntegraData.InvoiceDAL InvoiceDAL = new IntegraData.InvoiceDAL(); DataTable AddressTable; int itypeperson = 13; using (AddressTable = PersonBLL.ObtenDomicilioPersonaPorTipoDomicilio(client, itypeperson)) { if (AddressTable != null && AddressTable.Rows.Count > 0) { try { SQLConection context = new SQLConection(); context.Parametros.Clear(); context.Parametros.Add(new SqlParameter("@Numero_Empresa", company)); context.Parametros.Add(new SqlParameter("@Numero_Cotiza", salenumber)); context.Parametros.Add(new SqlParameter("@Tipo_Docto", document)); context.Parametros.Add(new SqlParameter("@Serie", serie)); context.Parametros.Add(new SqlParameter("@Numero_Documento", folio)); context.Parametros.Add(new SqlParameter("@Fecha", date)); context.Parametros.Add(new SqlParameter("@Num_Domicilio", Convert.ToInt32(AddressTable.Rows[0][0]))); context.Parametros.Add(new SqlParameter("@Calle", AddressTable.Rows[0][2].ToString())); context.Parametros.Add(new SqlParameter("@Colonia", AddressTable.Rows[0][3].ToString())); context.Parametros.Add(new SqlParameter("@CP", AddressTable.Rows[0][6].ToString())); context.Parametros.Add(new SqlParameter("@Estado", AddressTable.Rows[0][5].ToString())); context.Parametros.Add(new SqlParameter("@Delegacion", AddressTable.Rows[0][4].ToString())); context.Parametros.Add(new SqlParameter("@Telefono", AddressTable.Rows[0][7].ToString())); context.Parametros.Add(new SqlParameter("@Tipo_Domicilio", AddressTable.Rows[0][11].ToString())); context.Parametros.Add(new SqlParameter("@Tipo_Parcial_Total", iParcialTotal)); context.Parametros.Add(new SqlParameter("@Anticipo", iAnticipo)); context.ExecuteProcedure("sp_Factura_Tienda_v2", true); return(1); } catch { throw; } finally { InvoiceDAL = null; } } else { return(-1); } } }
public DataTable CalculaImporteCxC(int icompany, int iinvoicenumber) { IntegraData.InvoiceDAL InvoiceDAL = new IntegraData.InvoiceDAL(); try { return(InvoiceDAL.CalculaImporteCxC(icompany, iinvoicenumber)); } catch { return(null); } }
public string GetStatusDescriptionFromStatusNumber(int icompany, int istatus, int ifamily) { IntegraData.InvoiceDAL Invoice = new IntegraData.InvoiceDAL(); DataTable StatusTable; using (StatusTable = ObtenDescripcionDeEstatusporsuNumero(icompany, istatus, ifamily)) { if (StatusTable != null && StatusTable.Rows.Count > 0) { return(StatusTable.Rows[0][0].ToString()); } } return(null); }
public bool PayInvoiceProcess() { IntegraData.InvoiceDAL PayDAL = new IntegraData.InvoiceDAL(); try { return(PayDAL.PayInvoiceProcess(iCompany, iInvoiceNumber)); } catch { return(false); } }
public bool PayInvoice() { IntegraData.InvoiceDAL PayDAL = new IntegraData.InvoiceDAL(); try { return(PayDAL.PayInvoice(iType, iCompany, iInvoiceNumber, iNumberAux, iConceptNumber, iCurrency, dExchange, dIngreso, dEgreso, sAux, Person)); } catch { return(false); } }
public int CancelInvoice(int company, int typeinvoice, int invoicenumber, DateTime date, int person, string causa, int NumeroTransaccion, string auxcliente, decimal totalinvoice, string tituloinvoice, DateTime dateinvoice) { IntegraData.InvoiceDAL InvoiceDAL = new IntegraData.InvoiceDAL(); try { if (InvoiceDAL.CancelInvoice(company, typeinvoice, invoicenumber, date, person, causa, NumeroTransaccion, auxcliente, totalinvoice, tituloinvoice, dateinvoice)) { return(1); } } catch { throw; } finally { InvoiceDAL = null; } return(0); }
public string GetExepcion() { IntegraData.InvoiceDAL InvoiceDAL = new IntegraData.InvoiceDAL(); return(InvoiceDAL.RetornaError()); }