Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public override OperationDTO GetById(int Id)
        {
            try
            {
                OperationTableAdapter.Fill(OperationDataTable);
                BorrowNlendDataSet.OperationRow operationRow = OperationDataTable.First(opRow => opRow.ID == Id);

                OperationDTO operationDTO = new OperationDTO()
                {
                    ID     = operationRow.ID,
                    Amount = operationRow.Amount,
                    Type   = (OperationType)operationRow.Type,
                    Person = PersonDAO.Instance.GetById(operationRow.Person_ID)
                };

                return(operationDTO);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 2
0
 internal OperationRow(global::System.Data.DataRowBuilder rb) : 
         base(rb) {
     this.tableOperation = ((OperationDataTable)(this.Table));
 }
Exemplo n.º 3
0
 private void InitClass() {
     this.DataSetName = "OperationDataSet";
     this.Prefix = "";
     this.Namespace = "http://thesofttribe.com/platform/sledger/OperationDataSet.xsd";
     this.EnforceConstraints = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableOperation = new OperationDataTable();
     base.Tables.Add(this.tableOperation);
 }
Exemplo n.º 4
0
 internal void InitVars(bool initTable) {
     this.tableOperation = ((OperationDataTable)(base.Tables["Operation"]));
     if ((initTable == true)) {
         if ((this.tableOperation != null)) {
             this.tableOperation.InitVars();
         }
     }
 }
Exemplo n.º 5
0
 internal OperationRow(global::System.Data.DataRowBuilder rb) :
     base(rb)
 {
     this.tableOperation = ((OperationDataTable)(this.Table));
 }