Exemplo n.º 1
0
        public void SaveMainRow()
        {
            if (SelectedMainRow != null)
            {
                var valiationCollection = new List <ValidationResult>();

                var isvalid = Validator.TryValidateObject(SelectedMainRow, new ValidationContext(SelectedMainRow, null, null), valiationCollection, true);

                if (isvalid)
                {
                    var save    = SelectedMainRow.Iserial == 0;
                    var saveRow = new TblTransferMsg();
                    saveRow.InjectFrom(SelectedMainRow);
                    Client.UpdateOrInsertTblTransferMsgAsync(saveRow, save, MainRowList.IndexOf(SelectedMainRow), LoggedUserInfo.Code);
                }
            }
        }