コード例 #1
0
ファイル: StatusDAL.cs プロジェクト: baikangwang/TJVISA
        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 },
            }));
        }
コード例 #2
0
        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 + "" }
            }));
        }
コード例 #3
0
ファイル: CaseDAL.cs プロジェクト: baikangwang/TJVISA
        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 }
            }));
        }
コード例 #4
0
        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 }
            }));
        }
コード例 #5
0
        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 }
            }));
        }
コード例 #6
0
        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 }
            }));
        }