Example #1
0
        public bool SaveAll(Model.DressType aDressType)
        {
            aDressTypeGateway = new DressTypeGateway();

            if (aDressTypeGateway.SaveAll(aDressType))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #2
0
        public bool SaveAll(Model.DressType aDressType)
        {
            connection.Open();
            string query = string.Format("INSERT INTO DressTypeTable values ('{0}','{1}','{2}','{3}')",
                                         aDressType.Name, aDressType.TailoringRate, aDressType.SticherRate, aDressType.CutterRate
                                         );

            command = new SqlCommand(query, connection);
            int affectedRows = command.ExecuteNonQuery();

            connection.Close();
            if (affectedRows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }