public int InsertDocumentsAdj(DocumentsAdj pDocumentsAdj) { try { return(_AD.InsertDocumentsAdj(pDocumentsAdj)); } catch (Exception ex) { throw; } }
public bool UpdateDocumentsAdj(DocumentsAdj pDocumentsAdj) { try { _AD.UpdateDocumentsAdj(pDocumentsAdj); return(true); } catch (Exception ex) { throw; } }
public void UpdateDocumentsAdj(DocumentsAdj pDocumentsAdj) { string sql = @"[spUpdateDocumentsAdj] '{0}', '{1}', '{2}', '{3}', '{4}'"; sql = string.Format(sql, pDocumentsAdj.Id, pDocumentsAdj.Name, pDocumentsAdj.Route, pDocumentsAdj.Status.Id, pDocumentsAdj.ModificationUser); try { _MB.EjecutarSQL(_CN, sql); } catch (Exception err) { throw err; } }
public int InsertDocumentsAdj(DocumentsAdj pDocumentsAdj) { string sql = @"[spInsertDocumentsAdj] '{0}', '{1}', '{2}', '{3}', '{4}'"; sql = string.Format(sql, pDocumentsAdj.Name, pDocumentsAdj.Route, pDocumentsAdj.Status.Id, pDocumentsAdj.CreatorUser, pDocumentsAdj.ModificationUser); try { return(_MB.EjecutarSQL(_CN, sql)); } catch (Exception err) { throw err; } }
public DocumentsAdj GetDocumentsAdjById(int Id) { DocumentsAdj adj = new DocumentsAdj(); string sql = @"[spGetDocumentsAdj] '{0}' "; sql = string.Format(sql, Id); try { DataSet ds = new DataSet(); ds = _MB.CreaDS(ds, "DocumentsAdj", sql, _CN); if (ds.Tables["DocumentsAdj"].Rows.Count > 0) { foreach (DataRow item in ds.Tables["DocumentsAdj"].Rows) { adj = new DocumentsAdj() { Id = int.Parse(item["Id"].ToString()), Name = item["Name"].ToString(), Route = item["Route"].ToString(), Status = new Status() { Id = int.Parse(item["IdStatus"].ToString()), Description = item["DescripStatus"].ToString() }, CreationDate = (item["CreationDate"].ToString() != "") ? DateTime.Parse(item["CreationDate"].ToString()) : DateTime.Parse("01/01/1900"), ModificationDate = (item["ModificationDate"].ToString() != "") ? DateTime.Parse(item["ModificationDate"].ToString()) : DateTime.Parse("01/01/1900"), CreatorUser = int.Parse(item["CreatorUser"].ToString()), ModificationUser = int.Parse(item["ModificationUser"].ToString()), }; } } return(adj); } catch (Exception) { throw; } }
public object DeleteDocumentsAdj(DocumentsAdj dDocumentsAdj) { throw new NotImplementedException(); }