示例#1
0
        protected override void ShowItemInGridViewRow(DataGridViewRow row, object item)
        {
            OTType OTType = item as OTType;

            row.Tag = OTType;
            row.Cells["colName"].Value     = OTType.Name;
            row.Cells["colMultiple"].Value = OTType.Multiple;
            row.Cells["colMemo"].Value     = OTType.Memo;
        }
示例#2
0
        public CommandResult Update(OTType info)
        {
            OTType original = ProviderFactory.Create <IOTTypeProvider>(_RepoUri).GetByID(info.ID).QueryObject;

            if (original != null)
            {
                return(ProviderFactory.Create <IOTTypeProvider>(_RepoUri).Update(info, original));
            }
            else
            {
                return(new CommandResult(ResultCode.NoRecord, ResultCodeDecription.GetDescription(ResultCode.NoRecord)));
            }
        }
示例#3
0
 public CommandResult Delete(OTType info)
 {
     return(ProviderFactory.Create <IOTTypeProvider>(_RepoUri).Delete(info));
 }
示例#4
0
 public CommandResult Add(OTType info)
 {
     return(ProviderFactory.Create <IOTTypeProvider>(_RepoUri).Insert(info));
 }