public Arss BuildFromRow(DataRow row) { var returnRecord = Arss.BuildArssFromRow(row); returnRecord = this.BuildExtraFromRow <Arss>(returnRecord, row); return(returnRecord); }
public Arss Insert(Arss record) { DataRow row = this.dataSet.ttblarss.NewttblarssRow(); this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.dataSet.ttblarss.AddttblarssRow((pdsarssDataSet.ttblarssRow)row); this.SaveChanges(); return(this.dataSet.ttblarss.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblarss.Rows[0]) : null); }
public Arss GetByRowId(string rowId, string fldList) { var row = this.GetRowByRowId(rowId, fldList); Arss arss = null; if (row != null) { arss = this.BuildFromRow(row); } return(arss); }
protected Arss Fetch(string where, int batchsize, string fldList) { this.FetchWhere(where, batchsize, fldList); var row = this.dataSet.ttblarss.AsEnumerable().SingleOrDefault(); Arss arss = null; if (row != null) { arss = this.BuildFromRow(row); } return(arss); }
private void DeleteUseRowID(Arss record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttblarss.NewttblarssRow(); Arss.BuildMinimalRow(ref row, record); this.dataSet.ttblarss.AddttblarssRow((pdsarssDataSet.ttblarssRow)row); } row.Delete(); this.SaveChanges(); }
public Arss Update(Arss record) { var row = this.GetRowByRowpointer(record.rowpointer, string.Empty); if (row != null) { this.UpdateToRow(ref row, record); this.ExtraUpdateToRow(ref row, record); this.SaveChanges(); return(this.dataSet.ttblarss.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblarss.Rows[0]) : null); } ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421); return(null); }
public void Delete(Arss record) { this.adapter.Delete(record); }
public Arss Update(Arss record) { return(this.adapter.Update(record)); }
public Arss Insert(Arss record) { return(this.adapter.Insert(record)); }
public AretLookupResponseAPI LookupInvoiceSequence(Aretlookupcriteria aretlookupcriteria) { var arsc = new Arsc(); var arsses = new List <Arss>(); var sb = new StringBuilder(); sb.AppendFormatWithEscape("aret.cono = {0}", this.aretRepository.Cono); sb.AppendFormatWithEscape(" AND aret.invno = {0}", aretlookupcriteria.invno); sb.AppendFormatWithEscape(" AND aret.invsuf = {0}", aretlookupcriteria.invsuf); sb.AppendFormatWithEscape(" AND aret.seqno >= {0}", aretlookupcriteria.seqno); sb.AppendFormatWithEscape(" AND aret.custno = {0}", aretlookupcriteria.custno); sb.AppendFormatWithEscape(" AND aret.statustype = {0}", aretlookupcriteria.statustype); sb.AppendFormatWithEscape(" AND aret.transcd = {0}", aretlookupcriteria.transcd); var where = sb.ToString(); var resultFetchWhere = this.aretRepository.GetList(where, aretlookupcriteria.IsAutoComplete ? 10 : aretlookupcriteria.recordcountlimit, aretlookupcriteria.IsAutoComplete ? "seqno" : "seqno,amount,rowID,custno,invdt,invno,invsuf,jrnlno,notesfl,refer,shipto,statustype,transcd,notesfl").ToList(); if (resultFetchWhere.Count > 0 && !aretlookupcriteria.IsAutoComplete) { arsc = this.arscRepository.Get(0, aretlookupcriteria.custno, false, 1, "custno,name,notefl") ?? new Arsc(); } var results = new AretLookupResponseAPI(); foreach (var fwResult in resultFetchWhere) { var result = new Aretlookupresults { seqno = fwResult.seqno }; if (!aretlookupcriteria.IsAutoComplete) { var arss = arsses.FirstOrDefault(x => x.shipto == fwResult.shipto); if (arss == null) { if (string.IsNullOrEmpty(fwResult.shipto)) { arss = new Arss { shipto = "", name = string.Empty }; } else { arss = this.arssRepository.Get(0, fwResult.custno, fwResult.shipto, 1, "shipto,name") ?? new Arss { shipto = fwResult.shipto, name = string.Empty }; } arsses.Add(arss); } result.amount = fwResult.amount; result.aretRowid = fwResult.rowID; result.custno = fwResult.custno; result.invdt = fwResult.invdt; result.invno = fwResult.invno; result.invsuf = fwResult.invsuf; result.jrnlno = fwResult.jrnlno; result.notesfl = fwResult.notesfl; result.refer = fwResult.refer; result.shipto = fwResult.shipto; result.statustype = fwResult.statustype; result.transcd = fwResult.transcd; result.arscName = arsc.name; result.custnotesfl = arsc.notesfl; result.arssName = arss.name; } results.aretlookupresults.Add(result); } return(results); }
public void UpdateToRow(ref DataRow row, Arss record) { Arss.UpdateRowFromArss(ref row, record); this.ExtraUpdateToRow(ref row, record); }
public void Delete(Arss record) { this.repository.Delete(record); }
public Arss Update(Arss record) { return(this.repository.Update(record)); }
public Arss Insert(Arss record) { return(this.repository.Insert(record)); }