示例#1
0
        public bool ActivateItem(ItemMasterObject itemMas)
        {
            SqlParameter[] params_ = new SqlParameter[] {
                new SqlParameter("@id", itemMas.Id),
                new SqlParameter("@Code", itemMas.Code),
                new SqlParameter("@table", "tblItems"),
                new SqlParameter("@IP", Helpers.CustomHelper.GetLocalIPAddress()),
                new SqlParameter("@MAC", Helpers.CustomHelper.GetMACAddress()),
                new SqlParameter("@Module", "ITEM"),
                new SqlParameter("@AddedBy", itemMas.AddedBy),
                new SqlParameter("@DateAdded", itemMas.DateAdded)
            };

            return(Library.ConnectionString.returnCon.executeQuery("spActivateItem", params_, CommandType.StoredProcedure));
        }
示例#2
0
        public bool AddItems(ItemMasterObject itemMas)
        {
            SqlParameter[] params_ = new SqlParameter[] {
                new SqlParameter("@Name", itemMas.Name),
                new SqlParameter("@Description", itemMas.Description),
                new SqlParameter("@ItemCategoryCode", itemMas.ItemCategoryCode),
                new SqlParameter("@ItemTypeCode", itemMas.ItemTypeCode),
                new SqlParameter("@ItemDepRelCode", itemMas.ItemDepRelCode),
                new SqlParameter("@UOM", itemMas.ItemUOM),
                new SqlParameter("@IsActive", itemMas.IsActive),
                new SqlParameter("@AddedBy", itemMas.AddedBy),
                new SqlParameter("@DateAdded", itemMas.DateAdded),
                new SqlParameter("@IP", Helpers.CustomHelper.GetLocalIPAddress()),
                new SqlParameter("@MAC", Helpers.CustomHelper.GetMACAddress())
            };

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