예제 #1
0
        public async Task <int> DeactiveProdSubCatAsync(MstrProductSubCat MstrProductSubCat)
        {
            DynamicParameters para = new DynamicParameters();

            para.Add("AutoId", MstrProductSubCat.AutoId);
            para.Add("IsActive", MstrProductSubCat.IsActive);
            para.Add("UserId", MstrProductSubCat.CreateUserId);
            para.Add("@Result", dbType: DbType.Int32, direction: ParameterDirection.Output);

            var result = await DbConnection.ExecuteAsync("spMstrProductSubCatDeactive", para
                                                         , commandType : CommandType.StoredProcedure);

            return(para.Get <int>("Result"));
        }
예제 #2
0
        public async Task <int> SaveProductSubCatAsync(MstrProductSubCat MstrProductSubCat)
        {
            DynamicParameters para = new DynamicParameters();

            para.Add("AutoId", MstrProductSubCat.AutoId);
            para.Add("ProdSubCatName", MstrProductSubCat.ProdSubCatName.Trim());
            para.Add("ProdSubCatCode", MstrProductSubCat.ProdSubCatCode.Trim().ToUpper());
            para.Add("ProdGroupId", MstrProductSubCat.ProdGroupId);
            para.Add("UserId", MstrProductSubCat.CreateUserId);
            para.Add("@Result", dbType: DbType.Int32, direction: ParameterDirection.Output);

            var result = await DbConnection.ExecuteAsync("spMstrProductSubCategorySave", para
                                                         , commandType : CommandType.StoredProcedure);

            return(para.Get <int>("Result"));
        }