示例#1
0
        public bool AddCategory(CategoryObject itemCat)
        {
            SqlParameter[] params_ = new SqlParameter[] {
                new SqlParameter("@Name", itemCat.Name),
                new SqlParameter("@Description", itemCat.Description),
                new SqlParameter("@IsActive", itemCat.IsActive),
                new SqlParameter("@AddedBy", itemCat.AddedBy),
                new SqlParameter("@DateAdded", itemCat.DateAdded),
                new SqlParameter("@IP", Helpers.CustomHelper.GetLocalIPAddress()),
                new SqlParameter("@MAC", Helpers.CustomHelper.GetMACAddress())
            };

            return(Library.ConnectionString.returnCon.executeQuery("spAddCategoryItem", params_, CommandType.StoredProcedure));
        }
示例#2
0
        public bool ActivateCategory(CategoryObject itemcat)
        {
            SqlParameter[] params_ = new SqlParameter[] {
                new SqlParameter("@id", itemcat.Id),
                new SqlParameter("@Code", itemcat.Code),
                new SqlParameter("@table", "tblItemCategories"),
                new SqlParameter("@IP", Helpers.CustomHelper.GetLocalIPAddress()),
                new SqlParameter("@MAC", Helpers.CustomHelper.GetMACAddress()),
                new SqlParameter("@Module", "ITEM"),
                new SqlParameter("@AddedBy", itemcat.AddedBy),
                new SqlParameter("@DateAdded", itemcat.DateAdded)
            };

            return(Library.ConnectionString.returnCon.executeQuery("spActivateItem", params_, CommandType.StoredProcedure));
        }