Exemple #1
0
 public CreatedSepticTank(SepticTankSpec spec)
 {
     SepticTankSpec = spec;
 }
Exemple #2
0
        public static bool CreateSepticTank(this IRepository <IDbProperties> repository, SepticTankSpec spec)
        {
            var septic    = spec;
            var dataTypes = new List <IDataTypes>
            {
                new DataTypes("@hostel", SqlDbType.NVarChar, 50, spec.HostelId, ParameterDirection.Input, false, false, ""),
                new DataTypes("@tag", SqlDbType.NVarChar, 50, septic.Tag, ParameterDirection.Input, false, false, ""),
                new DataTypes("@height", SqlDbType.Int, 0, septic.Height.ToString(), ParameterDirection.Input, false, false, ""),
                new DataTypes("@septictank", SqlDbType.UniqueIdentifier, 0, string.Empty, ParameterDirection.Output, false, false, "@septictank")
            };
            var repos = new DbProperties("CreateSepticTank", dataTypes, string.Empty, true, "@septictank");
            var x     = repository.Update(new[] { repos });

            if (x > 0 || !string.IsNullOrWhiteSpace(repos.Id))
            {
                spec.SepticTankId = repos.Id;
                return(true);
            }
            return(false);
        }
Exemple #3
0
 public CreateSepticTank(SepticTankSpec spec, string commander, string commandid)
 {
     Spec      = spec;
     Commander = commander;
     CommandId = commandid;
 }