public static IStatus Create(DBCommand cmd, string id, string value) { var od = AppCore.AppSingleton.FindObjDef <StatusObjDef>(); return(cmd.Create <IStatus>("Status", new Dictionary <IAttributeDefinition, object>() { { od.PrimaryKey, id }, { od.Value, value }, })); }
public static ICollection Create(DBCommand cmd, string id, decimal?value, decimal?offset) { var od = AppCore.AppSingleton.FindObjDef <CollectionObjDef>(); return(cmd.Create <ICollection>("Collection", new Dictionary <IAttributeDefinition, object>() { { od.PrimaryKey, id }, { od.Value, value == null ? null : value.Value + "" }, { od.Offset, offset == null ? null : offset.Value + "" } })); }
public static ICase Create(DBCommand cmd, string id, string type, string text) { var od = AppCore.AppSingleton.FindObjDef <CaseObjDef>(); return(cmd.Create <ICase>("Case", new Dictionary <IAttributeDefinition, object>() { { od.PrimaryKey, id }, { od.Type, type }, { od.Text, text } })); }
public static IUser Create(DBCommand cmd, string id, string name, string password, UserRole?role) { var od = AppCore.AppSingleton.FindObjDef <UserObjDef>(); return(cmd.Create <IUser>("User", new Dictionary <IAttributeDefinition, object>() { { od.PrimaryKey, id }, { od.Name, name }, { od.Password, password }, { od.Role, role } })); }
public static ICustomer Create(DBCommand cmd, string id, string name, string sex, string phone, string address) { var od = AppCore.AppSingleton.FindObjDef <CustomerObjDef>(); return(cmd.Create <ICustomer>("Customer", new Dictionary <IAttributeDefinition, object>() { { od.PrimaryKey, id }, { od.Name, name }, { od.Sex, sex }, { od.Phone, phone }, { od.Address, address } })); }
public static IApplication Create(DBCommand cmd, string id, /*string type, string subType,*/ string customerId, string region, DateTime?dateApplied, DateTime?dateTraved, string offNoteNo, DateTime?offNoteDate, string remark) { var od = AppCore.AppSingleton.FindObjDef <ApplicationObjDef>(); return(cmd.Create <IApplication>("Application", new Dictionary <IAttributeDefinition, object>() { { od.PrimaryKey, id }, //{od.Type, type}, //{od.SubType, subType}, { od.CustomerID, customerId }, //{od.CustomerName, customerName}, //{od.CustomerSex, customerSex}, { od.Region, region }, { od.DateApplied, dateApplied }, { od.DateTraved, dateTraved }, { od.OffNoteNo, offNoteNo }, { od.OffNoteDate, offNoteDate }, { od.Remark, remark } })); }