public CreatedSepticTank(SepticTankSpec spec) { SepticTankSpec = spec; }
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); }
public CreateSepticTank(SepticTankSpec spec, string commander, string commandid) { Spec = spec; Commander = commander; CommandId = commandid; }