首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

请帮看一段程序,是实现什么功能,多谢

2012-01-15 
请帮看一段程序,是实现什么功能,谢谢!usingSystemusingSystem.DatausingSystem.ConfigurationusingSyst

请帮看一段程序,是实现什么功能,谢谢!
using   System;
using   System.Data;
using   System.Configuration;
using   System.Web;
using   System.Web.Security;
using   System.Web.UI;
using   System.Web.UI.WebControls;
using   System.Web.UI.WebControls.WebParts;
using   System.Web.UI.HtmlControls;
using   System.Collections.Generic;
using   MB.RobbieSet.DAL;

namespace   MB.RobbieSet.BLL.Store
{
      public   class   Department   :   BaseStore
      {


            private   string   _title   =   " ";
            public   string   Title
            {
                  get   {   return   _title;   }
                  set   {   _title   =   value;   }
            }

            private   int   _importance   =   0;
            public   int   Importance
            {
                  get   {   return   _importance;   }
                  private   set   {   _importance   =   value;   }
            }

            private   string   _description   =   " ";
            public   string   Description
            {
                  get   {   return   _description;   }
                  set   {   _description   =   value;   }
            }

            private   string   _imageUrl   =   " ";
            public   string   ImageUrl
            {
                  get   {   return   _imageUrl;   }
                  set   {   _imageUrl   =   value;   }
            }

            private   int   _preCategoryID   =   0;
            public   int   PreCategoryID
            {
                    get   {   return   _preCategoryID;   }
                    set   {   _preCategoryID   =   value;   }
            }

            private   List <Product>   _allProducts   =   null;
            public   List <Product>   AllProducts
            {
                  get


                  {
                        if   (_allProducts   ==   null)
                              _allProducts   =   Product.GetProducts(this.ID,   " ",   0,   BizObject.MAXROWS);
                        return   _allProducts;
                  }
            }

            public   Department(int   id,   DateTime   addedDate,   string   addedBy,   string   title,   int   importance,   string   description,   string   imageUrl,int   PrecategoryID)
            {
                  this.ID   =   id;
                  this.AddedDate   =   addedDate;
                  this.AddedBy   =   addedBy;
                  this.Title   =   title;
                  this.Importance   =   importance;
                  this.Description   =   description;
                  this.ImageUrl   =   imageUrl;
                  this.PreCategoryID   =   PrecategoryID;
            }

              public   bool   Delete()
              {
                      bool   success   =   Department.DeleteDepartment(this.ID);
                      if   (success)
                              this.ID   =   0;
                      return   success;
              }

            public   bool   Update()
            {  
                  return   Department.UpdateDepartment(this.ID,   this.Title,   this.Importance,   this.Description,   this.ImageUrl,this.PreCategoryID);
            }

            /***********************************
            *   Static   methods
            ************************************/

            ///   <summary>
            ///   Returns   a   collection   with   all   the   departments
            ///   </summary>
              public   static   List <Department>   GetDepartments()


            {
                  List <Department>   departments   =   null;
                  string   key   =   "Store_Departments ";

                  if   (BaseStore.Settings.EnableCaching   &&   BizObject.Cache[key]   !=   null)
                  {
                        departments   =   (List <Department> )BizObject.Cache[key];
                  }
                  else
                  {
                        List <DepartmentDetails>   recordset   =   SiteProvider.Store.GetDepartments();                      
                        departments   =   GetDepartmentListFromDepartmentDetailsList(recordset);
                        BaseStore.CacheData(key,   departments);
                }
                      return   departments;
            }

            ///   <summary>
            ///   Returns   a   collection   with   the   departments   through   Precategory
            ///   </summary>
              public   static   List <Department>   GetDepartments(int   preCategroyID)
            {
                    List <Department>   departments   =   null;
                    string   key   =   "Store_DepartmentsByCate "   +   preCategroyID.ToString();

                    if   (BaseStore.Settings.EnableCaching   &&   BizObject.Cache[key]   !=   null)
                    {
                            departments   =   (List <Department> )BizObject.Cache[key];
                    }
                    else
                    {
                            List <DepartmentDetails>   recordset   =   SiteProvider.Store.GetDepartments(preCategroyID);
                            departments   =   GetDepartmentListFromDepartmentDetailsList(recordset);
                            BaseStore.CacheData(key,   departments);


                    }
                    return   departments;
            }

    未完,待续


[解决办法]
晕倒,这么长,
这个应该到.NET模块去问吧
[解决办法]
好像是 C # 啊
[解决办法]
对部门信息的增、删、改、读。。

热点排行