public static void AddRowToDocumentTable(DataTable table, Document.SaveData data) { table.Rows.Add( data.Id, data.DocumentTypeId, data.Series, data.Number, data.IssueDate, data.ExpirationDate, data.IsIssueCase, data.IssueDepartment); }
public Document.SaveData GetForBLL() { Document.SaveData data = new Document.SaveData(); data.Id = this.Id; data.DocumentTypeId = this.DocumentTypeID == 0 ? new long?() : this.DocumentTypeID; data.Series = this.Series; data.Number = this.Number; data.IssueDate = this.IssueDate; data.ExpirationDate = this.ExpirationDate; data.IsIssueCase = this.DocumentTypeID == Constants.USSRPasportDocumentId; data.IssueDepartment = this.IssueDepartment; return(data); }
public static Document.SaveData GetDocumentSaveData(long?id) { Document.SaveData data = new Document.SaveData(); data.Id = id; data.IsIssueCase = true; data.IssueDate = DateTime.Now.AddYears(-3); data.ExpirationDate = DateTime.Now.AddYears(1); data.IssueDepartment = "УФМС"; data.Series = "1234"; data.Number = "121234"; ReferenceBusinessLogic bll = new ReferenceBusinessLogic(); //Паспорт гражданина РФ data.DocumentTypeId = bll.GetReferencesList(Constants.DocumentTypeRef).Where(a => a.Code == "14").FirstOrDefault().Id; return(data); }