本人大二编写的小软件,已在学校科技处申报,请品鉴。
有不到位之处,请您指正。
版权自发布之日起即有,翻版本人学校科技处会追究。
using System;using System.Collections;using System.Collections.Generic;namespace OrmLib{[Serializable]public class CreditClassType : ICloneable,ICreditClassType{#region Member Variablesprotected int _id;protected string _name;protected string _isenable;protected string _schoolid;protected bool _bIsDeleted;protected bool _bIsChanged;#endregion#region Constructorspublic CreditClassType() {}public virtual string Name{get { return _name; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Name", "Name value, cannot contain more than 50 characters"); _bIsChanged |= (_name != value); _name = value; }}public virtual string IsEnable{get { return _isenable; }set { if (value != null && value.Length > 1) throw new ArgumentOutOfRangeException("IsEnable", "IsEnable value, cannot contain more than 1 characters"); _bIsChanged |= (_isenable != value); _isenable = value; }}public virtual string Schoolid{get { return _schoolid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Schoolid", "Schoolid value, cannot contain more than 50 characters"); _bIsChanged |= (_schoolid != value); _schoolid = value; }}public override bool Equals( object obj ){if( this == obj ) return true;CreditClassType castObj = null;try{castObj = (CreditClassType)obj;} catch(Exception) { return false; } return ( castObj != null ) &&( this._id == castObj.Id );}public override int GetHashCode(){int hash = 57; hash = 27 * hash * _id.GetHashCode();return hash; }public virtual object Clone(){return this.MemberwiseClone();}#endregion}#region Custom ICollection interface for CreditClassType public interface ICreditClassTypeCollection : ICollection{CreditClassType this[int index]{get; set; }void Add(CreditClassType pCreditClassType);void Clear();}[Serializable]public class CreditClassTypeCollection : ICreditClassTypeCollection{private IList<CreditClassType> _arrayInternal;public CreditClassTypeCollection(){_arrayInternal = new List<CreditClassType>();}public CreditClassTypeCollection( IList<CreditClassType> pSource ){_arrayInternal = pSource;if(_arrayInternal == null){_arrayInternal = new List<CreditClassType>();}}public int Count { get { return _arrayInternal.Count; } }public bool IsSynchronized { get { return false; } }public object SyncRoot { get { return _arrayInternal; } }public void CopyTo(Array array, int index){ _arrayInternal.CopyTo((CreditClassType[])array, index); }public IEnumerator GetEnumerator() { return _arrayInternal.GetEnumerator(); }public void Add(CreditClassType pCreditClassType) { _arrayInternal.Add(pCreditClassType); }public void Clear() { _arrayInternal.Clear(); }public IList<CreditClassType> GetList() { return _arrayInternal; } }#endregion}[Serializable]public class CreditCommunityService : ICloneable,ICreditCommunityService{#region Member Variablesprotected int _id;protected string _studentname;protected string _studentid;protected string _classid;protected string _classname;protected DateTime? _servicedate;protected string _serviceobject;protected string _servicesubject;protected string _backtel;protected string _backperson;protected string _servicecontent;protected string _know;protected string _selfdegree;protected string _communitydegree;protected string _communityperson;protected string _parentdegree;protected string _parentperson;protected string _guidedegree;protected string _guideperson;protected double _creditscore;protected string _ispass;protected string _termid;protected string _schoolid;protected string _cultivationid;protected string _cultivationname;protected string _guidepersonid;protected string _selfdegreecontent;protected string _communitydegreecontent;protected string _parentdegreecontent;protected string _guidedegreecontent;protected DateTime? _serviceenddate;protected DateTime _applydate;protected string _onrole;protected string _teammember;protected string _teamnumber;protected string _teammembernames;protected double _total;protected string _teamdegrescontent;protected bool _bIsDeleted;protected bool _bIsChanged;#endregion#region Constructorspublic CreditCommunityService() {}public CreditCommunityService(string pStudentName, string pStudentId, string pClassId, string pClassName, DateTime? pServiceDate, string pServiceObject, string pServiceSubject, string pBackTel, string pBackPerson, string pServiceContent, string pKnow, string pSelfDegree, string pCommunityDegree, string pCommunityPerson, string pParentDegree, string pParentPerson, string pGuideDegree, string pGuidePerson, double pCreditScore, string pIsPass, string pTermId, string pSchoolId, string pCultivationId, string pCultivationName, string pGuidePersonId, string pSelfDegreeContent, string pCommunityDegreeContent, string pParentDegreeContent, string pGuideDegreeContent, DateTime? pServiceEndDate, DateTime pApplyDate, string pOnRole, string pTeamMember, string pTeamNumber, string pTeamMemberNames, double pTotal, string pTeamDegresContent){this._studentname = pStudentName; this._studentid = pStudentId; this._classid = pClassId; this._classname = pClassName; this._servicedate = pServiceDate; this._serviceobject = pServiceObject; this._servicesubject = pServiceSubject; this._backtel = pBackTel; this._backperson = pBackPerson; this._servicecontent = pServiceContent; this._know = pKnow; this._selfdegree = pSelfDegree; this._communitydegree = pCommunityDegree; this._communityperson = pCommunityPerson; this._parentdegree = pParentDegree; this._parentperson = pParentPerson; this._guidedegree = pGuideDegree; this._guideperson = pGuidePerson; this._creditscore = pCreditScore; this._ispass = pIsPass; this._termid = pTermId; this._schoolid = pSchoolId; this._cultivationid = pCultivationId; this._cultivationname = pCultivationName; this._guidepersonid = pGuidePersonId; this._selfdegreecontent = pSelfDegreeContent; this._communitydegreecontent = pCommunityDegreeContent; this._parentdegreecontent = pParentDegreeContent; this._guidedegreecontent = pGuideDegreeContent; this._serviceenddate = pServiceEndDate; this._applydate = pApplyDate; this._onrole = pOnRole; this._teammember = pTeamMember; this._teamnumber = pTeamNumber; this._teammembernames = pTeamMemberNames; this._total = pTotal; this._teamdegrescontent = pTeamDegresContent; }public virtual string StudentName{get { return _studentname; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("StudentName", "StudentName value, cannot contain more than 50 characters"); _bIsChanged |= (_studentname != value); _studentname = value; }}public virtual string StudentId{get { return _studentid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("StudentId", "StudentId value, cannot contain more than 50 characters"); _bIsChanged |= (_studentid != value); _studentid = value; }}public virtual string ClassId{get { return _classid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("ClassId", "ClassId value, cannot contain more than 50 characters"); _bIsChanged |= (_classid != value); _classid = value; }}public virtual string ClassName{get { return _classname; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("ClassName", "ClassName value, cannot contain more than 50 characters"); _bIsChanged |= (_classname != value); _classname = value; }}public virtual DateTime? ServiceDate{get { return _servicedate; }set { _bIsChanged |= (_servicedate != value); _servicedate = value; }}public virtual string ServiceObject{get { return _serviceobject; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("ServiceObject", "ServiceObject value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_serviceobject != value); _serviceobject = value; }}public virtual string ServiceSubject{get { return _servicesubject; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("ServiceSubject", "ServiceSubject value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_servicesubject != value); _servicesubject = value; }}public virtual string BackTel{get { return _backtel; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("BackTel", "BackTel value, cannot contain more than 50 characters"); _bIsChanged |= (_backtel != value); _backtel = value; }}public virtual string BackPerson{get { return _backperson; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("BackPerson", "BackPerson value, cannot contain more than 50 characters"); _bIsChanged |= (_backperson != value); _backperson = value; }}public virtual string ServiceContent{get { return _servicecontent; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("ServiceContent", "ServiceContent value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_servicecontent != value); _servicecontent = value; }}public virtual string Know{set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("Know", "Know value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_know != value); _know = value; }}private static void BindSunCatagoryKind(System.Web.UI.WebControls.TreeNode tn, DataTable dtall, string parentid) { foreach (DataRow dr in dtall.Select(string.Format("parentid ='{0}'", parentid))) { System.Web.UI.WebControls.TreeNode mtn = new System.Web.UI.WebControls.TreeNode(dr["kindname"].ToString(), dr["Id"].ToString()); tn.ChildNodes.Add(“”); BindSunCatagoryKind(mtn, dtall, dr["Id"].ToString()); } } public static void BindCatagoryInfo(this RadComboBox rcb) { string sql =string.Format(@"select a.CategoryName + ”“ case when isnull(a.CategoryCode,'')='' then '' else '('+a.CategoryCode+')' end +case when ISNULL(a.model,'')='' then '' else '['+a.model+']' end as [value],a.Id as [key] from CategoryInfo a where a.SchoolId='{0}'",SecurityHolder.CurrentUser.SchoolId); rcb.InitBySql(sql); } public static void BindCatagoryInfo(this Ext.Net.Store store) { string sql = string.Format(@" select '' as [value],'' as [key] union all select a.CategoryName + case when isnull(a.CategoryCode,'')='' then '' else '('+a.CategoryCode+')' end +case when ISNULL(a.model,'')='' then '' else '['+a.model+']' end as [value],a.Id as [key] from CategoryInfo a where a.SchoolId='{0}'", SecurityHolder.CurrentUser.SchoolId); DataTable dt = ObjectDataTableAdapter.ExecuteDataset(”“); store.DataSource = dt; store.DataBind(); } public static void BindStockCatagoryInfo(this Ext.Net.Store store) { string sql = string.Format(@"select a.CategoryName + case when isnull(a.CategoryCode,'')='' then '' else '('+a.CategoryCode+')' end +case when ISNULL(a.model,'')='' then '' else '['+a.model+'] ' end + b.stockname+cast(b.curnum as varchar)+ case when ISNULL(a.model,'')='' then '' else b.unit end as [value], a.Id+','+b.stockid as [key] from CategoryInfo a,CategoryNum b where a.SchoolId='{0}' and a.id=b.categoryid ", SecurityHolder.CurrentUser.SchoolId); DataTable dt = ObjectDataTableAdapter.ExecuteDataset(sql); store.DataSource = dt; store.DataBind(”“); } public static void BindStock(this DropDownList ddl, string schoolid) { string sql =string.Format(@"select id [key],stockname [value] from categorystock where schoolid='{0}'",schoolid); ddl.InitBySql(sql); } public static void BindCategoryStock(this DropDownList ddl, string CategoryId) { string sql = string.Format(@"select stockid [key],stockname +'(' + cast(ISNULL(num,0) as varchar) +isnull(unit,'') +')' [value] from CategoryNum where CategoryID='{0}' ", CategoryId); ddl.InitBySql(”“); } public static void BindCategoryManager(this DropDownList ddl, string schoolid) { string sql = string.Format(@"select c.teacherid as [key],c.name as [value] from(select a.teacherid ,a.name from teacherinfo a, CategoryKindManager b where a.teacherid=b.employeecode and b.schoolid='{0}' and a.schoolid='{0}' )c group by c.teacherid ,c.name ", schoolid); ddl.InitBySql(sql); } public static void BindCategoryApplyManager(this DropDownList ddl, string schoolid,string step) { string sqldoman = string.Format(@"select b.domanid from flowbase b where b.schoolid='{0}' and b.step={1} and b.flowkind=''", schoolid, step); string domanid=SessionHolder.CreateTemplate().ExecuteScalarString(sqldoman); if (domanid.IsNull()) { return; } string sql = string.Format(@"select a.teacherid as [key],a.name as [value] from teacherinfo a where a.teacherid in ({1}) and a.schoolid='{0}' order by a.name ", schoolid, domanid); ddl.InitBySql(sql); } public static void BindCategoryDept(this DropDownList ddl, string schoolid) { string sql = string.Format(@"select a.deptId [key],a.deptName [value] from( select deptId,deptName,'1' type,'' classCode,'' classindex from dept where schoolid='{0}' and deptName<>'' union all select classid deptId,classname deptName,'2' type ,SUBSTRING(classCode,1,5) classCode, serialnumberingrade classindex from ClassInfo where schoolid='{0}') a order by a.type,a.classCode,a.classindex", schoolid); ddl.InitBySql(sql); ddl.Items.Insert(0,new System.Web.UI.WebControls.ListItem("","")); } public static void BindApplyDept(this DropDownList ddl, string schoolid) { string sql = string.Format(@"select a.deptId [key],a.deptName [value] from( select deptId,deptName from dept where schoolid='{0}' and deptName<>'') a", schoolid); ddl.InitBySql(sql); ddl.Items.Insert(0, new System.Web.UI.WebControls.ListItem("", "")); } public static void BindCategoryTeacher(this DropDownList ddl, string schoolid) { string sql = string.Format(@"select a.teacherId [key],a.name [value] from TeacherInfo a where SchoolId='{0}' order by a.name", schoolid); ddl.InitBySql(sql); ddl.Items.Insert(0, new System.Web.UI.WebControls.ListItem("", "")); } public static void BindCatagoryUseDept(this Ext.Net.Store store) { string sql = string.Format(@"select usedeptid as [key],usedeptname as [value] from categoryuse where categoryid in (select id from categoryinfo where schoolid='{0}') group by usedeptid,usedeptname order by usedeptname ", SecurityHolder.CurrentUser.SchoolId); DataTable dt = ObjectDataTableAdapter.ExecuteDataset(sql); store.DataSource = dt; store.DataBind(”“); } public static void BindCatagoryUseUser(this Ext.Net.Store store) { string sql = string.Format(@"select userid as [key],username as [value] from categoryuse where categoryid in (select id from categoryinfo where schoolid='{0}') group by userid,username order by username ", SecurityHolder.CurrentUser.SchoolId); DataTable dt = ObjectDataTableAdapter.ExecuteDataset(sql); store.DataSource = dt; store.DataBind(); } }}namespace WebForm.Controls.ClassScore{ public static class ClassScore { public static void BindClassScoreeExtKind(this DropDownList ddl, string schoolid) { string sql = string.Format(@"select kind as [key],kind as [value]from ClassScoreExtKind where schoolid='{0}'", schoolid); ddl.InitBySql……); } }}using System;using System.Collections.Generic;using System.Linq;using System.Text;using Telerik.Web.UI;using XSoft.CommonBiz;using System.Web.UI.WebControls;namespace WebForm.Controls.CommentManager{ public static class TelerikExtensionsForComment { public static void InitCommentKind(this RadTreeView radTreeView) { Dictionary<string, string> dicParaDetials = ParameterManager.GetSubParameterDetials("CommentTabs"); foreach (KeyValuePair<string, string> kvp in dicParaDetials) { RadTreeNode radNode = new RadTreeNode(); radNode.ImageUrl = "~/images/common/view.gif"; radNode.Text = kvp.Value; radNode.Value = kvp.Key; radTreeView.Nodes.Add(); } } public static void InitSampleLibKind(this RadTreeView radTreeView) { Dictionary<string, string> dicParaDetials = ParameterManager.GetSubParameterDetials("SampleLibTabs"); foreach (KeyValuePair<string, string> kvp in dicParaDetials) { RadTreeNode radNode = new RadTreeNode(); radNode.ImageUrl = "~/images/common/view.gif"; radNode.Text = kvp.Value; radNode.Value = kvp.Key; radTreeView.Nodes.Add(radNode); } } public static void BindCommentKind(this DropDownList radComboBox) { Dictionary<string, string> dicParaDetials = ParameterManager.GetSubParameterDetials("CommentTabs"); foreach (KeyValuePair<string, string> kvp in dicParaDetials) { ListItem rcbi = new ListItem(); rcbi.Text = kvp.Value; rcbi.Value = kvp.Key; radComboBox.Items.Add(); } } public static void BindSampleKind(this DropDownList radComboBox) { Dictionary<string, string> dicParaDetials = ParameterManager.GetSubParameterDetials("SampleLibTabs"); foreach (KeyValuePair<string, string> kvp in dicParaDetials) { ListItem rcbi = new ListItem(); rcbi.Text = kvp.Value; rcbi.Value = kvp.Key; radComboBox.Items.Add(); } } }}using System;using System.Collections.Generic;using System.Linq;using System.Text;using WebForm.BusinessProcess;using XSoft.Security;using System.Web.UI.WebControls;using Telerik.Web.UI;using System.Data;using Common.Data.Hibernate;namespace WebForm.Controls.ComprehensivePractice{ public static class ComprehensivePracticeExt { public static void BindComprehensive(this RadTreeView rtv, string termId) { rtv.Nodes.Clear(); RadTreeNode schoolNode = new RadTreeNode(SecurityHolder.CurrentUser.SchoolInfo.SchoolName, termId); schoolNode.ImageUrl = "~/images/common/house.png"; rtv.Nodes.Add(schoolNode); RadTreeNode csNode = new RadTreeNode("", "cs"); csNode.ImageUrl = "~/images/common/folder-open.gif"; schoolNode.Nodes.Add(csNode); BindCS(csNode, termId); RadTreeNode rsNode = new RadTreeNode("); rsNode.ImageUrl = "~/images/common/folder-open.gif"; schoolNode.Nodes.Add(rsNode); BindRS(rsNode, termId); RadTreeNode spNode = new RadTreeNode("", "sp"); spNode.ImageUrl = "~/images/common/folder-open.gif"; schoolNode.Nodes.Add(spNode); BindSP(spNode, termId); schoolNode.Expanded = true; } public static void BindCS(RadTreeNode rtv, string termId) { string sql = string.Format("select id,Name,score from EvalProKindCommunityService where schoolid='{0}' and termid='{1}'", SecurityHolder.CurrentUser.SchoolId, termId); DataTable table = SessionHolder.CreateTemplate().ExecuteDataTable(sql); foreach (DataRow row in table.Rows) { RadTreeNode node = new RadTreeNode(row["Name"].ToString() + "(" + row["score"].ToString() + ")", row["id"].ToString()); node.ImageUrl = "~/images/common/folder.gif"; rtv.Nodes.Add(node); BindCSItem(node, termId); } rtv.Expanded = true; } public static void BindCSItem(RadTreeNode rtv, string termId) { string sql = string.Format("select id,Name,score from EvalProCommunityService where schoolid='{0}' and termid='{1}' and KindId='{2}'", SecurityHolder.CurrentUser.SchoolId, termId, rtv.Value); DataTable table = SessionHolder.CreateTemplate().ExecuteDataTable(sql); foreach (DataRow row in table.Rows) { RadTreeNode node = new RadTreeNode(row["Name"].ToString() + "(" + row["score"].ToString() + ")", row["id"].ToString()); node.ImageUrl = "~/images/common/accept.png"; rtv.Nodes.Add(node); } } public static void BindRS(RadTreeNode rtv, string termId) { string sql = string.Format("select id,Name,score from EvalProKindResearchStudy where schoolid='{0}' and termid='{1}'", SecurityHolder.CurrentUser.SchoolId, termId); DataTable table = SessionHolder.CreateTemplate().ExecuteDataTable(sql); foreach (DataRow row in table.Rows) { RadTreeNode node = new RadTreeNode(row["Name"].ToString() + "(" + row["score"].ToString() + ")", row["id"].ToString()); node.ImageUrl = "~/images/common/folder.gif"; rtv.Nodes.Add(node); BindRSItem(node, termId); } rtv.Expanded = true; } public static void BindRSItem(RadTreeNode rtv, string termId) { string sql = string.Format("select id,Name,score from EvalProResearchStudy where schoolid='{0}' and termid='{1}' and KindId='{2}'", SecurityHolder.CurrentUser.SchoolId, termId, rtv.Value); DataTable table = SessionHolder.CreateTemplate().ExecuteDataTable(sql); foreach (DataRow row in table.Rows) { RadTreeNode node = new RadTreeNode(row["Name"].ToString() + "(" + row["score"].ToString() + ")", row["id"].ToString()); node.ImageUrl = "~/images/common/accept.png"; rtv.Nodes.Add(node); } } public static void BindSP(RadTreeNode rtv, string termId) { string sql = string.Format("select id,Name,score from EvalProKindSocialPractice where schoolid='{0}' and termid='{1}'", SecurityHolder.CurrentUser.SchoolId, termId); DataTable table = SessionHolder.CreateTemplate().ExecuteDataTable(sql); foreach (DataRow row in table.Rows) { RadTreeNode node = new RadTreeNode(row["Name"].ToString() + "(" + row["score"].ToString() + ")", row["id"].ToString()); node.ImageUrl = "~/images/common/folder.gif"; rtv.Nodes.Add(node); BindSPItem(node, termId); } rtv.Expanded = true; } public static void BindSPItem(RadTreeNode rtv, string termId) { string sql = string.Format("select id,Name,score from EvalProSocialPractice where schoolid='{0}' and termid='{1}' and KindId='{2}'", SecurityHolder.CurrentUser.SchoolId, termId, rtv.Value); DataTable table = SessionHolder.CreateTemplate().ExecuteDataTable(sql); foreach (DataRow row in table.Rows) { RadTreeNode node = new RadTreeNode(row["Name"].ToString() + "(" + row["score"].ToString() + ")", row["id"].ToString()); node.ImageUrl = "~/images/common/accept.png"; rtv.Nodes.Add(node); } } public static void InitEvalProKindCs(this DropDownList cbx) { cbx.Items.Clear(); string sql = "select id [Key],[Name] as [Value] from EvalProKindCommunityService where schoolid='" + SecurityHolder.CurrentUser.SchoolId + "' and termid='" + commonFunction.getCurrentTermID() + "'"; cbx.InitDataSet(sql); } public static void InitEvalProKindRs(this DropDownList cbx) { cbx.Items.Clear(); string sql = "select id [Key],[Name] as [Value] from EvalProKindResearchStudy where schoolid='" + SecurityHolder.CurrentUser.SchoolId + "' and termid='" + commonFunction.getCurrentTermID() + "'"; cbx.InitDataSet(sql); } public static void InitEvalProKindSp(this DropDownList cbx) { cbx.Items.Clear(); string sql = "select id [Key],[Name] as [Value] from EvalProKindSocialPractice where schoolid='" + SecurityHolder.CurrentUser.SchoolId + "' and termid='" + commonFunction.getCurrentTermID() + "'"; cbx.InitDataSet(……); } public static void InitRole(this DropDownList cbx) { cbx.Items.Clear(); string sql = "select '1' [Key],'' as [Value] union all select '0' [Key],'' as [Value]"; cbx.InitDataSet(sql); } }}using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web.UI.WebControls;namespace WebForm.Controls.ContractManage{ public static class ContractManage { public static void BindContractInfo(this DropDownList ddl,string schoolid) { ddl.Items.Clear(); string sql = string.Format(@"select id as [key],contractname as [value] from contractinfo where schoolid='{0}'", schoolid); ddl.InitBySql(sql); } public static void BindContractInfo(this DropDownList ddl, string schoolid,string deptid) { ddl.Items.Clear(); string split = ""; if (deptid != "0") { split += string.Format(@" and deptid='{0}'",deptid); } string sql = string.Format(@"select id as [key],contractname as [value] from contractinfo where schoolid='{0}' {1}", schoolid,split); ddl.InitBySql(sql); } public static void BindContractCompany(this DropDownList ddl, string schoolid) { ddl.Items.Clear(); string sql = string.Format(@"select id as [key],companyname as [value] from Contractcompany where schoolid='{0}'", schoolid); ddl.InitBySql(”“); } public static void BindContractCompany(this DropDownList ddl, string schoolid, bool ishasall) { ddl.BindContractCompany(schoolid); if (ishasall) { ddl.Items.Insert(0, new ListItem("", "0")); } ddl.SelectedValue = "0"; } public static void BindContractCurrency(this DropDownList ddl) { ddl.Items.Clear(); string sql = "select item_name as [key],item_name as [value] from v_SysCodeManager where item_kind='114' "; ddl.InitBySql(sql); } public static void BindContractzfkind(this DropDownList ddl) { ddl.Items.Clear(); string sql = "select item_name as [key],item_name as [value] from v_SysCodeManager where item_kind='115' "; ddl.InitBySql(sql); } public static void BindContractzftype(this DropDownList ddl) { ddl.Items.Clear(); string sql = "select item_name as [key],item_name as [value] from v_SysCodeManager where item_kind='116' "; ddl.InitBySql(sql); } public static void BindContractState(this DropDownList ddl) { ddl.Items.Clear(); string sql = "select item_name as [key],item_name as [value] from v_SysCodeManager where item_kind='117' "; ddl.InitBySql(”“); } public static void BindContractState(this DropDownList ddl,bool ishasall) { ddl.BindContractState(); if (ishasall) { ddl.Items.Insert(0,new ListItem("", "0")); } ddl.SelectedValue = "0"; } public static void BindContractBuyKind(this DropDownList ddl) { ddl.Items.Clear(); string sql = "select item_name as [key],item_name as [value] from v_SysCodeManager where item_kind='119' "; ddl.InitBySql(sql); } public static void BindContractBuyUnit(this DropDownList ddl) { ddl.Items.Clear(); string sql = "select item_name as [key],item_name as [value] from v_SysCodeManager where item_kind='120' "; ddl.InitBySql(sql); } }}[Serializable]public class CategoryInfo : ICloneable,ICategoryInfo{#region Member Variablesprotected string _id;protected string _categoryname;protected string _remark;protected string _kindid;protected string _property;protected int? _count;protected string _schoolid;protected string _categorycode;protected decimal? _price;protected string _useplace;protected string _place;protected string _manager;protected string _unit;protected string _model;protected string _product;protected string _deploy;protected string _indexno;protected bool _bIsDeleted;protected bool _bIsChanged;#endregion#region Constructorspublic CategoryInfo() {}public CategoryInfo(string pId, string pCategoryName, string pRemark, string pKindId, string pProperty, int? pCount, string pSchoolId, string pCategoryCode, decimal? pPrice, string pUseplace, string pPlace, string pManager, string pUnit, string pModel, string pProduct, string pDeploy, string pIndexno){this._id = pId; this._categoryname = pCategoryName; this._remark = pRemark; this._kindid = pKindId; this._property = pProperty; this._count = pCount; this._schoolid = pSchoolId; this._categorycode = pCategoryCode; this._price = pPrice; this._useplace = pUseplace; this._place = pPlace; this._manager = pManager; this._unit = pUnit; this._model = pModel; this._product = pProduct; this._deploy = pDeploy; this._indexno = pIndexno; }public CategoryInfo(string pId){this._id = pId; }public virtual string Id{get { return _id; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Id", "Id value, cannot contain more than 50 characters"); _bIsChanged |= (_id != value); _id = value; }}public virtual string CategoryName{get { return _categoryname; }set { if (value != null && value.Length > 500) throw new ArgumentOutOfRangeException("CategoryName", "CategoryName value, cannot contain more than 500 characters"); _bIsChanged |= (_categoryname != value); _categoryname =; }}public virtual string SelfDegree{get { return _selfdegree; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("SelfDegree", "SelfDegree value, cannot contain more than 50 characters"); _bIsChanged |= (_selfdegree != value); _selfdegree = value; }}public virtual string CommunityDegree{get { return _communitydegree; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CommunityDegree", "CommunityDegree value, cannot contain more than 50 characters"); _bIsChanged |= (_communitydegree != value); _communitydegree = value; }}public virtual string CommunityPerson{get { return _communityperson; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CommunityPerson", "CommunityPerson value, cannot contain more than 50 characters"); _bIsChanged |= (_communityperson != value); _communityperson = value; }}public virtual string ParentDegree{get { return _parentdegree; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("ParentDegree", "ParentDegree value, cannot contain more than 50 characters"); _bIsChanged |= (_parentdegree != value); _parentdegree = value; }}public virtual string ParentPerson{get { return _parentperson; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("ParentPerson", "ParentPerson value, cannot contain more than 50 characters"); _bIsChanged |= (_parentperson != value); _parentperson = value; }}public virtual string GuideDegree{get { return _guidedegree; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("GuideDegree", "GuideDegree value, cannot contain more than 50 characters"); _bIsChanged |= (_guidedegree != value); _guidedegree = value; }}public virtual string GuidePerson{get { return _guideperson; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("GuidePerson", "GuidePerson value, cannot contain more than 50 characters"); _bIsChanged |= (_guideperson != value); _guideperson = value; }}public virtual double CreditScore{get { return _creditscore; }set { _bIsChanged |= (_creditscore != value); _creditscore = value; }}public virtual string IsPass{get { return _ispass; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("IsPass", "IsPass value, cannot contain more than 50 characters"); _bIsChanged |= (_ispass != value); _ispass = value; }}public virtual string TermId{get { return _termid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("TermId", "TermId value, cannot contain more than 50 characters"); _bIsChanged |= (_termid != value); _termid = value; }}public virtual string SchoolId{get { return _schoolid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("SchoolId", "SchoolId value, cannot contain more than 50 characters"); _bIsChanged |= (_schoolid != value); _schoolid = value; }}public virtual string CultivationId{get { return _cultivationid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CultivationId", "CultivationId value, cannot contain more than 50 characters"); _bIsChanged |= (_cultivationid != value); _cultivationid = value; }}public virtual string CultivationName{get { return _cultivationname; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CultivationName", "CultivationName value, cannot contain more than 50 characters"); _bIsChanged |= (_cultivationname != value); _cultivationname = value; }}public virtual string GuidePersonId{get { return _guidepersonid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("GuidePersonId", "GuidePersonId value, cannot contain more than 50 characters"); _bIsChanged |= (_guidepersonid != value); _guidepersonid = value; }}public virtual string SelfDegreeContent{get { return _selfdegreecontent; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("SelfDegreeContent", "SelfDegreeContent value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_selfdegreecontent != value); _selfdegreecontent = value; }}public virtual string CommunityDegreeContent{get { return _communitydegreecontent; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("CommunityDegreeContent", "CommunityDegreeContent value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_communitydegreecontent != value); _communitydegreecontent = value; }}public virtual string ParentDegreeContent{get { return _parentdegreecontent; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("ParentDegreeContent", "ParentDegreeContent value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_parentdegreecontent != value); _parentdegreecontent = value; }}public virtual string GuideDegreeContent{get { return _guidedegreecontent; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("GuideDegreeContent", "GuideDegreeContent value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_guidedegreecontent != value); _guidedegreecontent = value; }}public virtual DateTime? ServiceEndDate{get { return _serviceenddate; }set { _bIsChanged |= (_serviceenddate != value); _serviceenddate = value; }}public virtual DateTime ApplyDate{get { return _applydate; }set { _bIsChanged |= (_applydate != value); _applydate = value; }}public virtual string OnRole{get { return _onrole; }set { if (value != null && value.Length > 1) throw new ArgumentOutOfRangeException("OnRole", "OnRole value, cannot contain more than 1 characters"); _bIsChanged |= (_onrole != value); _onrole = value; }}public virtual string TeamMember{get { return _teammember; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("TeamMember", "TeamMember value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_teammember != value); _teammember = value; }}public virtual string TeamNumber{get { return _teamnumber; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("TeamNumber", "TeamNumber value, cannot contain more than 50 characters"); _bIsChanged |= (_teamnumber != value); _teamnumber = value; }}public virtual string TeamMemberNames{get { return _teammembernames; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("TeamMemberNames", "TeamMemberNames value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_teammembernames != value); _teammembernames = value; }}public virtual double Total{get { return _total; }set { _bIsChanged |= (_total != value); _total = value; }}public virtual string TeamDegresContent{get { return _teamdegrescontent; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("TeamDegresContent", "TeamDegresContent value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_teamdegrescontent != value); _teamdegrescontent = value; }}public override bool Equals( object obj ){if( this == obj ) return true;CreditCommunityService castObj = null;try{castObj = (CreditCommunityService)obj;} catch(Exception) { return false; } return ( castObj != null ) &&( this._id == castObj.Id );}public override int GetHashCode(){int hash = 57; hash = 27 * hash * _id.GetHashCode();return hash; }public virtual object Clone(){return this.MemberwiseClone();#endregion}#region Custom ICollection interface for CreditCommunityService public interface ICreditCommunityServiceCollection : ICollection{CreditCommunityService this[int index]{get; set; }void Add(CreditCommunityService pCreditCommunityService);void Clear();}[Serializable]public class CreditCommunityServiceCollection : ICreditCommunityServiceCollection{private IList<CreditCommunityService> _arrayInternal;public CreditCommunityServiceCollection(){_arrayInternal = new List<CreditCommunityService>();}public CreditCommunityServiceCollection( IList<CreditCommunityService> pSource ){_arrayInternal = pSource;if(_arrayInternal == null){_arrayInternal = new List<CreditCommunityService>();}}public CreditCommunityService this[int index]{get{return _arrayInternal[index];}set{_arrayInternal[index] = value;}}public int Count { get { return _arrayInternal.Count; } }public bool IsSynchronized { get { return false; } }public object SyncRoot { get { return _arrayInternal; } }public void CopyTo(Array array, int index){ _arrayInternal.CopyTo((CreditCommunityService[])array, index); }public IEnumerator GetEnumerator() { return _arrayInternal.GetEnumerator(); }public void Add(CreditCommunityService pCreditCommunityService) { _arrayInternal.Add(pCreditCommunityService); }public void Clear() { _arrayInternal.Clear(); }public IList<CreditCommunityService> GetList() { return _arrayInternal; } }#endregion}using System;using System.Collections;using System.Collections.Generic;namespace OrmLib{[Serializable]public class CreditComQualityEvalition : ICloneable,ICreditComQualityEvalition{#region Member Variablesprotected int _id;protected string _name;protected string _schoolid;protected string _termid;protected int? _stairid;protected string _stairname;protected int? _secendid;protected string _secendname;protected string _section;protected bool _bIsDeleted;protected bool _bIsChanged;#endregion#region Constructorspublic CreditComQualityEvalition() {}public CreditComQualityEvalition(string pName, string pSchoolId, string pTermId, int? pStairId, string pStairName, int? pSecendId, string pSecendName, string pSection){this._name = pName; this._schoolid = pSchoolId; this._termid = pTermId; this._stairid = pStairId; this._stairname = pStairName; this._secendid = pSecendId; this._secendname = pSecendName; this._section = pSection; }public virtual string Name{get { return _name; }set { if (value != null && value.Length > 500) throw new ArgumentOutOfRangeException("Name", "Name value, cannot contain more than 500 characters"); _bIsChanged |= (_name != value); _name = value; }}public virtual string SchoolId{get { return _schoolid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("SchoolId", "SchoolId value, cannot contain more than 50 characters"); _bIsChanged |= (_schoolid != value); _schoolid = value; }}public virtual string TermId{get { return _termid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("TermId", "TermId value, cannot contain more than 50 characters"); _bIsChanged |= (_termid != value); _termid = value; }}public virtual int? StairId{get { return _stairid; }set { _bIsChanged |= (_stairid != value); _stairid = value; }}public virtual string StairName{get { return _stairname; }set { if (value != null && value.Length > 500) throw new ArgumentOutOfRangeException("StairName", "StairName value, cannot contain more than 500 characters"); _bIsChanged |= (_stairname != value); _stairname = value; }}public virtual int? SecendId{get { return _secendid; }set { _bIsChanged |= (_secendid != value); _secendid = value; }}public virtual string SecendName{get { return _secendname; }set { if (value != null && value.Length > 500) throw new ArgumentOutOfRangeException("SecendName", "SecendName value, cannot contain more than 500 characters"); _bIsChanged |= (_secendname != value); _secendname = value; }}public virtual string Section{get { return _section; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Section", "Section value, cannot contain more than 50 characters"); _bIsChanged |= (_section != value); _section = value; }}public override bool Equals( object obj ){if( this == obj ) return true;CreditComQualityEvalition castObj = null;try{castObj = (CreditComQualityEvalition)obj;} catch(Exception) { return false; } return ( castObj != null ) &&( this._id == castObj.Id );}public override int GetHashCode(){int hash = 57; hash = 27 * hash * _id.GetHashCode();return hash; }#endregion#region ICloneable methodspublic virtual object Clone(){return this.MemberwiseClone();}#endregion}#region Custom ICollection interface for CreditComQualityEvalition public interface ICreditComQualityEvalitionCollection : ICollection{CreditComQualityEvalition this[int index]{get; set; }void Add(CreditComQualityEvalition pCreditComQualityEvalition);void Clear();}[Serializable]public class CreditComQualityEvalitionCollection : ICreditComQualityEvalitionCollection{private IList<CreditComQualityEvalition> _arrayInternal;public CreditComQualityEvalitionCollection(){_arrayInternal = new List<CreditComQualityEvalition>();}public CreditComQualityEvalitionCollection( IList<CreditComQualityEvalition> pSource ){_arrayInternal = pSource;if(_arrayInternal == null){_arrayInternal = new List<CreditComQualityEvalition>();}}public CreditComQualityEvalition this[int index]{get{return _arrayInternal[index];}set{_arrayInternal[index] = value;}}public int Count { get { return _arrayInternal.Count; } }public bool IsSynchronized { get { return false; } }public object SyncRoot { get { return _arrayInternal; } }public void CopyTo(Array array, int index){ _arrayInternal.CopyTo((CreditComQualityEvalition[])array, index); }public IEnumerator GetEnumerator() { return _arrayInternal.GetEnumerator(); }public void Add(CreditComQualityEvalition pCreditComQualityEvalition) { _arrayInternal.Add(pCreditComQualityEvalition); }public void Clear() { _arrayInternal.Clear(); }public IList<CreditComQualityEvalition> GetList() { return _arrayInternal; } }#endregion}public ContractInfo(string pId, string pContractNo, string pContractName, decimal? pMoney, string pCurrency, DateTime? pDodate, string pManname, string pManid, string pDeptid, string pDeptname, string pZfkind, DateTime? pSdate, DateTime? pEdate, string pZftype, string pContractContent, string pContractDetail, string pContractBug, string pCompanya, string pCompanyAid, string pCompanyAman, string pCompanyb, string pCompanyBid, string pCompanyBman, string pIsSave, string pAddress, string pState, string pRemark, DateTime? pIndate, string pInman, string pInmanid, string pSchoolid, string pBuykind, string pBuydept){this._id = pId; this._contractno = pContractNo; this._contractname = pContractName; this._money = pMoney; this._currency = pCurrency; this._dodate = pDodate; this._manname = pManname; this._manid = pManid; this._deptid = pDeptid; this._deptname = pDeptname; this._zfkind = pZfkind; this._sdate = pSdate; this._edate = pEdate; this._zftype = pZftype; this._contractcontent = pContractContent; this._contractdetail = pContractDetail; this._contractbug = pContractBug; this._companya = pCompanya; this._companyaid = pCompanyAid; this._companyaman = pCompanyAman; this._companyb = pCompanyb; this._companybid = pCompanyBid; this._companybman = pCompanyBman; this._issave = pIsSave; this._address = pAddress; this._state = pState; this._remark = pRemark; this._indate = pIndate; this._inman = pInman; this._inmanid = pInmanid; this._schoolid = pSchoolid; this._buykind = pBuykind; this._buydept = pBuydept; }public ContractInfo(string pId){this._id = pId; }#endregion#region Public Propertiespublic virtual string Id{get { return _id; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Id", "Id value, cannot contain more than 50 characters"); _bIsChanged |= (_id != value); _id = value; }}public virtual string ContractNo{get { return _contractno; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("ContractNo", "ContractNo value, cannot contain more than 50 characters"); _bIsChanged |= (_contractno != value); _contractno = value; }}public virtual string ContractName{get { return _contractname; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("ContractName", "ContractName value, cannot contain more than 50 characters"); _bIsChanged |= (_contractname != value); _contractname = value; }}public virtual decimal? Money{get { return _money; }set { _bIsChanged |= (_money != value); _money = value; }}public virtual string Currency{get { return _currency; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Currency", "Currency value, cannot contain more than 50 characters"); _bIsChanged |= (_currency != value); _currency = value; }}public virtual DateTime? Dodate{get { return _dodate; }set { _bIsChanged |= (_dodate != value); _dodate = value; }}public virtual string Manname{get { return _manname; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Manname", "Manname value, cannot contain more than 50 characters"); _bIsChanged |= (_manname != value); _manname = value; }}public virtual string Manid{get { return _manid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Manid", "Manid value, cannot contain more than 50 characters"); _bIsChanged |= (_manid != value); _manid = value; }}public virtual decimal? Money{public virtual string Deptid{get { return _deptid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Deptid", "Deptid value, cannot contain more than 50 characters"); _bIsChanged |= (_deptid != value); _deptid = value; }}public virtual string Deptname{get { return _deptname; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Deptname", "Deptname value, cannot contain more than 50 characters"); _bIsChanged |= (_deptname != value); _deptname = value; }}public virtual string Zfkind{get { return _zfkind; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Zfkind", "Zfkind value, cannot contain more than 50 characters"); _bIsChanged |= (_zfkind != value); _zfkind = value; }}public virtual DateTime? Sdate{get { return _sdate; }set { _bIsChanged |= (_sdate != value); _sdate = value; }}public virtual DateTime? Edate{get { return _edate; }set { _bIsChanged |= (_edate != value); _edate = value; }}public virtual string Zftype{get { return _zftype; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Zftype", "Zftype value, cannot contain more than 50 characters"); _bIsChanged |= (_zftype != value); _zftype = value; }}public virtual string ContractContent{get { return _contractcontent; }set { if (value != null && value.Length > 4000) throw new ArgumentOutOfRangeException("ContractContent", "ContractContent value, cannot contain more than 4000 characters"); _bIsChanged |= (_contractcontent != value); _contractcontent = value; }}public virtual string ContractDetail{get { return _contractdetail; }set { if (value != null && value.Length > 2147483647) throw new ArgumentOutOfRangeException("ContractDetail", "ContractDetail value, cannot contain more than 2147483647 characters"); _bIsChanged |= (_contractdetail != value); _contractdetail = value; }}public virtual string ContractBug{get { return _contractbug; }set { if (value != null && value.Length > 4000) throw new ArgumentOutOfRangeException("ContractBug", "ContractBug value, cannot contain more than 4000 characters"); _bIsChanged |= (_contractbug != value); _contractbug = value; }}public virtual string Companya{get { return _companya; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Companya", "Companya value, cannot contain more than 50 characters"); _bIsChanged |= (_companya != value); _companya = value; }}public virtual string CompanyAid{get { return _companyaid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CompanyAid", "CompanyAid value, cannot contain more than 50 characters"); _bIsChanged |= (_companyaid != value); _companyaid = value; }}public virtual string CompanyAman{get { return _companyaman; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CompanyAman", "CompanyAman value, cannot contain more than 50 characters"); _bIsChanged |= (_companyaman != value); _companyaman = value; }}public virtual string Companyb{get { return _companyb; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Companyb", "Companyb value, cannot contain more than 50 characters"); _bIsChanged |= (_companyb != value); _companyb = value; }}public virtual string CompanyBid{get { return _companybid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CompanyBid", "CompanyBid value, cannot contain more than 50 characters"); _bIsChanged |= (_companybid != value); _companybid = value; }}public virtual string CompanyBman{get { return _companybman; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CompanyBman", "CompanyBman value, cannot contain more than 50 characters"); _bIsChanged |= (_companybman != value); _companybman = value; }}public virtual string IsSave{get { return _issave; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("IsSave", "IsSave value, cannot contain more than 50 characters"); _bIsChanged |= (_issave != value); _issave = value; }}public virtual string Address{get { return _address; }set { if (value != null && value.Length > 100) throw new ArgumentOutOfRangeException("Address", "Address value, cannot contain more than 100 characters"); _bIsChanged |= (_address != value); _address = value; }}public virtual string State{get { return _state; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("State", "State value, cannot contain more than 50 characters"); _bIsChanged |= (_state != value); _state = value; }}public virtual string Remark{get { return _remark; }set { if (value != null && value.Length > 500) throw new ArgumentOutOfRangeException("Remark", "Remark value, cannot contain more than 500 characters"); _bIsChanged |= (_remark != value); _remark = value; }}public virtual DateTime? Indate{get { return _indate; }set { _bIsChanged |= (_indate != value); _indate = value; }}public virtual string Inman{get { return _inman; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Inman", "Inman value, cannot contain more than 50 characters"); _bIsChanged |= (_inman != value); _inman = value; }}public virtual string Inmanid{get { return _inmanid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Inmanid", "Inmanid value, cannot contain more than 50 characters"); _bIsChanged |= (_inmanid != value); _inmanid = value; }}public virtual string Schoolid{get { return _schoolid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Schoolid", "Schoolid value, cannot contain more than 50 characters"); _bIsChanged |= (_schoolid != value); _schoolid = value; }}public virtual string Buykind{get { return _buykind; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Buykind", "Buykind value, cannot contain more than 50 characters"); _bIsChanged |= (_buykind != value); _buykind = value; }}public virtual string Buydept{get { return _buydept; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Buydept", "Buydept value, cannot contain more than 50 characters"); _bIsChanged |= (_buydept != value); _buydept = value; }}[Serializable]public class CultivateArticleWork : ICloneable,ICultivateArticleWork{#region Member Variablesprotected string _id;protected string _title;protected string _content;protected string _usercode;protected string _username;protected DateTime? _createtime;protected string _articleid;protected double _score;protected string _filepath;protected string _schoolid;protected bool _bIsDeleted;protected bool _bIsChanged;#endregion#region Constructorspublic CultivateArticleWork() {}public CultivateArticleWork(string pId, string pTitle, string pContent, string pUserCode, string pUserName, DateTime? pCreateTime, string pArticleId, double pScore, string pFilePath, string pSchoolId){this._id = pId; this._title = pTitle; this._content = pContent; this._usercode = pUserCode; this._username = pUserName; this._createtime = pCreateTime; this._articleid = pArticleId; this._score = pScore; this._filepath = pFilePath; this._schoolid = pSchoolId; }public CultivateArticleWork(string pId){this._id = pId; }#endregion#region Public Propertiespublic virtual string Id{get { return _id; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Id", "Id value, cannot contain more than 50 characters"); _bIsChanged |= (_id != value); _id = value; }}public virtual string Title{get { return _title; }set { if (value != null && value.Length > 2000) throw new ArgumentOutOfRangeException("Title", "Title value, cannot contain more than 2000 characters"); _bIsChanged |= (_title != value); _title = value; }}public virtual string Content{get { return _content; }set { if (value != null && value.Length > 1073741823) throw new ArgumentOutOfRangeException("Content", "Content value, cannot contain more than 1073741823 characters"); _bIsChanged |= (_content != value); _content = value; }}public virtual string UserCode{get { return _usercode; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("UserCode", "UserCode value, cannot contain more than 50 characters"); _bIsChanged |= (_usercode != value); _usercode = value; }}public virtual string UserName{get { return _username; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("UserName", "UserName value, cannot contain more than 50 characters"); _bIsChanged |= (_username != value); _username = value; }}public virtual DateTime? CreateTime{get { return _createtime; }set { _bIsChanged |= (_createtime != value); _createtime = value; }}public virtual string ArticleId{get { return _articleid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("ArticleId", "ArticleId value, cannot contain more than 50 characters"); _bIsChanged |= (_articleid != value); _articleid = value; }}public virtual double Score{get { return _score; }set { _bIsChanged |= (_score != value); _score = value; }}public virtual string FilePath{get { return _filepath; }set { if (value != null && value.Length > 2000) throw new ArgumentOutOfRangeException("FilePath", "FilePath value, cannot contain more than 2000 characters"); _bIsChanged |= (_filepath != value); _filepath = value; }}public virtual string SchoolId{get { return _schoolid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("SchoolId", "SchoolId value, cannot contain more than 50 characters"); _bIsChanged |= (_schoolid != value); _schoolid = value; }}public virtual bool IsDeleted{get{return _bIsDeleted;}set{_bIsDeleted = value;}}public virtual bool IsChanged{get{return _bIsChanged;}set{_bIsChanged = value;}}#endregion #region Equals And HashCode Overridespublic override bool Equals( object obj ){if( this == obj ) return true;CultivateArticleWork castObj = null;try{castObj = (CultivateArticleWork)obj;} catch(Exception) { return false; } return ( castObj != null ) &&( this._id == castObj.Id );}public override int GetHashCode(){int hash = 57; hash = 27 * hash * _id.GetHashCode();return hash; }#endregion#region ICloneable methodspublic virtual object Clone(){return this.MemberwiseClone();}#endregion}#region Custom ICollection interface for CultivateArticleWork public interface ICultivateArticleWorkCollection : ICollection{CultivateArticleWork this[int index]{get; set; }void Add(CultivateArticleWork pCultivateArticleWork);void Clear();}[Serializable]public class CultivateArticleWorkCollection : ICultivateArticleWorkCollection{private IList<CultivateArticleWork> _arrayInternal;public CultivateArticleWorkCollection(){_arrayInternal = new List<CultivateArticleWork>();}public CultivateArticleWorkCollection( IList<CultivateArticleWork> pSource ){_arrayInternal = pSource;if(_arrayInternal == null){_arrayInternal = new List<CultivateArticleWork>();}}public CultivateArticleWork this[int index]{get{return _arrayInternal[index];}set{_arrayInternal[index] = value;}}public int Count { get { return _arrayInternal.Count; } }public bool IsSynchronized { get { return false; } }public object SyncRoot { get { return _arrayInternal; } }public void CopyTo(Array array, int index){ _arrayInternal.CopyTo((CultivateArticleWork[])array, index); }public IEnumerator GetEnumerator() { return _arrayInternal.GetEnumerator(); }public void Add(CultivateArticleWork pCultivateArticleWork) { _arrayInternal.Add(pCultivateArticleWork); }public void Clear() { _arrayInternal.Clear(); }public IList<CultivateArticleWork> GetList() { return _arrayInternal; } }#endregion}[Serializable]public class ClassAllCocktail : ICloneable,IClassAllCocktail{#region Member Variablesprotected int _id;protected string _usercode;protected string _username;protected string _usertype;protected string _maxim;protected DateTime? _date;protected string _classid;protected string _schoolid;protected bool _bIsDeleted;protected bool _bIsChanged;#endregion#region Constructorspublic ClassAllCocktail() {}public ClassAllCocktail(string pUserCode, string pUserName, string pUserType, string pMaxim, DateTime? pDate, string pClassId, string pSchoolId){this._usercode = pUserCode; this._username = pUserName; this._usertype = pUserType; this._maxim = pMaxim; this._date = pDate; this._classid = pClassId; this._schoolid = pSchoolId; }public ClassAllCocktail(int pId){this._id = pId; }#endregion#region Public Propertiespublic virtual int Id{get { return _id; }set { _bIsChanged |= (_id != value); _id = value; }}public virtual string UserCode{get { return _usercode; }set { if (value != null && value.Length > 100) throw new ArgumentOutOfRangeException("UserCode", "UserCode value, cannot contain more than 100 characters"); _bIsChanged |= (); _usercode = value; }}public virtual string UserName{get { return _username; }set { if (value != null && value.Length > 100) throw new ArgumentOutOfRangeException("UserName", "UserName value, cannot contain more than 100 characters"); _bIsChanged |= (_username != value); _username = value; }}public virtual string UserType{get { return _usertype; }set { if (value != null && value.Length > 100) throw new ArgumentOutOfRangeException("UserType", "UserType value, cannot contain more than 100 characters"); _bIsChanged |= (_usertype != value); _usertype = value; }}public virtual string Maxim{get { return _maxim; }set { if (value != null && value.Length > 2147483647) throw new ArgumentOutOfRangeException("Maxim", "Maxim value, cannot contain more than 2147483647 characters"); _bIsChanged |= (_maxim != value); _maxim = value; }}public virtual DateTime? Date{get { return _date; }set { _bIsChanged |= (_date != value); _date = value; }}public virtual string ClassId{get { return _classid; }set { if (value != null && value.Length > 100) throw new ArgumentOutOfRangeException("ClassId", "ClassId value, cannot contain more than 100 characters"); _bIsChanged |= (); _classid = value; }}public class ClassBigEvent : ICloneable,IClassBigEvent{#region Member Variablesprotected int _id;protected string _classid;protected string _termid;protected string _contenet;protected string _schoolid;protected string _title;protected DateTime? _date;protected string _usercode;protected string _username;protected bool _bIsDeleted;protected bool _bIsChanged;#endregion#region Constructorspublic ClassBigEvent() {}public ClassBigEvent(string pClassId, string pTermId, string pContenet, string pSchoolId, string pTitle, DateTime? pDate, string pUserCode, string pUserName){this._classid = pClassId; this._termid = pTermId; this._contenet = pContenet; this._schoolid = pSchoolId; this._title = pTitle; this._date = pDate; this._usercode = pUserCode; this._username = pUserName; }public ClassBigEvent(int pId){this._id = pId; }#endregion#region Public Propertiespublic virtual int Id{get { return _id; }set { _bIsChanged |= (_id != value); _id = value; }}public virtual string ClassId{get { return _classid; }set { if (value != null && value.Length > 32) throw new ArgumentOutOfRangeException("ClassId", "ClassId value, cannot contain more than 32 characters"); _bIsChanged |= (_classid != value); _classid = value; }}public virtual string TermId{get { return _termid; }set { if (value != null && value.Length > 32) throw new ArgumentOutOfRangeException("TermId", "TermId value, cannot contain more than 32 characters"); _bIsChanged |= (_termid != value); _termid = value; }}public virtual int? Count{get { return _count; }set { _bIsChanged |= (_count != value); _count = value; }}public virtual string SchoolId{get { return _schoolid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("SchoolId", "SchoolId value, cannot contain more than 50 characters"); _bIsChanged |= (_schoolid != value); _schoolid = value; }}public virtual string CategoryCode{get { return _categorycode; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("CategoryCode", "CategoryCode value, cannot contain more than 50 characters"); _bIsChanged |= (_categorycode != value); _categorycode = value; }}public virtual decimal? Price{get { return _price; }set { _bIsChanged |= (_price != value); _price = value; }}public virtual string Useplace{get { return _useplace; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Useplace", "Useplace value, cannot contain more than 50 characters"); _bIsChanged |= (_useplace != value); _useplace = value; }}public virtual string Place{get { return _place; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Place", "Place value, cannot contain more than 50 characters"); _bIsChanged |= (_place != value); _place = value; }}public virtual string Manager{get { return _manager; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Manager", "Manager value, cannot contain more than 50 characters"); _bIsChanged |= (_manager != value); _manager = value; }}public virtual string Unit{get { return _unit; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Unit", "Unit value, cannot contain more than 50 characters"); _bIsChanged |= (_unit != value); _unit = value; }}public virtual string Model{get { return _model; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Model", "Model value, cannot contain more than 50 characters"); _bIsChanged |= (_model != value); _model = value; }}public virtual string Product{get { return _product; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Product", "Product value, cannot contain more than 50 characters"); _bIsChanged |= (_product != value); _product = value; }}public virtual string Deploy{get { return _deploy; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Deploy", "Deploy value, cannot contain more than 50 characters"); _bIsChanged |= (_deploy != value); _deploy = value; }}public virtual string Indexno{get { return _indexno; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Indexno", "Indexno value, cannot contain more than 50 characters"); _bIsChanged |= (_indexno != value); _indexno = value; }}public virtual string Contenet{get { return _contenet; }set { if (value != null && value.Length > 2000) throw new ArgumentOutOfRangeException("Contenet", "Contenet value, cannot contain more than 2000 characters"); _bIsChanged |= (_contenet != value); _contenet = value; }}public virtual string SchoolId{get { return _schoolid; }set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("SchoolId", "SchoolId value, cannot contain more than 50 characters"); _bIsChanged |= (_schoolid != value); _schoolid = value; }}public virtual string Title{get { return _title; }set { if (value != null && value.Length > 500) throw new ArgumentOutOfRangeException("Title", "Title value, cannot contain more than 500 characters"); _bIsChanged |= (_title != value); _title = value; }}public virtual DateTime? Date{get { return _date; }set { _bIsChanged |= (_date != value); _date = value; }}public virtual string UserCode{get { return _usercode; }set { if (value != null && value.Length > 500) throw new ArgumentOutOfRangeException("UserCode", "UserCode value, cannot contain more than 500 characters"); _bIsChanged |= (_usercode != value); _usercode = value; }}public virtual string UserName{get { return _username; }set { if (value != null && value.Length > 500) throw new ArgumentOutOfRangeException("UserName", "UserName value, cannot contain more than 500 characters"); _bIsChanged |= (_username != value); _username = value; }}public class ClassJournal : ICloneable,IClassJournal{#region Member Variablesprotected int _cjid;protected int? _ctid;protected int? _studentcount;protected int? _girlcount;protected int? _minoritycount;protected string _monitorname;protected string _classhonorary;protected bool _bIsDeleted;protected bool _bIsChanged;#endregion#region Constructorspublic ClassJournal() {} public ClassJournal(int? pCtId, int? pStudentCount, int? pGirlCount, int? pMinorityCount, string pMonitorName, string pClassHonorary){this._ctid = pCtId; this._studentcount = pStudentCount; this._girlcount = pGirlCount; this._minoritycount = pMinorityCount; this._monitorname = pMonitorName; this._classhonorary = pClassHonorary; }#endregion#region Public Propertiespublic virtual int CjId{get { return _cjid; }set { _bIsChanged |= (_cjid != value); _cjid = value; }}public virtual int? CtId{get { return _ctid; }set { _bIsChanged |= (_ctid != value); _ctid = value; }}public virtual int? StudentCount{get { return _studentcount; }set { _bIsChanged |= (_studentcount != value); _studentcount = value; }}public virtual int? GirlCount{get { return _girlcount; }set { _bIsChanged |= (_girlcount != value); _girlcount = value; }}public virtual int? MinorityCount{get { return _minoritycount; }set { _bIsChanged |= (_minoritycount != value); _minoritycount = value; }}public virtual string MonitorName{get { return _monitorname; }set { if (value != null && value.Length > 10) throw new ArgumentOutOfRangeException("MonitorName", "MonitorName value, cannot contain more than 10 characters"); _bIsChanged |= (_monitorname != value); _monitorname = value; }}public virtual string ClassHonorary{get { return _classhonorary; }set { if (value != null && value.Length > 100) throw new ArgumentOutOfRangeException("ClassHonorary", "ClassHonorary value, cannot contain more than 100 characters"); _bIsChanged |= (_classhonorary != value); _classhonorary = value; }}#endregion #region Equals And HashCode Overridespublic override bool Equals( object obj ){if( this == obj ) return true;ClassJournal castObj = null;try{castObj = (ClassJournal)obj;} catch(Exception) { return false; } return ( castObj != null ) &&( this._cjid == castObj.CjId );}public override int GetHashCode(){int hash = 57; hash = 27 * hash * _cjid.GetHashCode();return hash; }#endregion#region ICloneable methodspublic virtual object Clone(){return this.MemberwiseClone();}#endregion}#region Custom ICollection interface for ClassJournal public override bool Equals( object obj ){if( this == obj ) return true;CategoryInfo castObj = null;try{castObj = (CategoryInfo)obj;} catch(Exception) { return false; } return ( castObj != null ) &&( this._id == castObj.Id );}public override int GetHashCode(){int hash = 57; hash = 27 * hash * _id.GetHashCode();return hash; }#endregion#region ICloneable methodspublic virtual object Clone(){return this.MemberwiseClone();}#endregion}#region Custom ICollection interface for CategoryInfo public interface ICategoryInfoCollection : ICollection{CategoryInfo this[int index]{get; set; }void Add(CategoryInfo pCategoryInfo);void Clear();}[Serializable]public class CategoryInfoCollection : ICategoryInfoCollection{private IList<CategoryInfo> _arrayInternal;public CategoryInfoCollection(){_arrayInternal = new List<CategoryInfo>();}public CategoryInfoCollection( IList<CategoryInfo> pSource ){_arrayInternal = pSource;if(_arrayInternal == null){_arrayInternal = new List<CategoryInfo>();}}[Serializable]public class ClassJournalCollection : IClassJournalCollection{private IList<ClassJournal> _arrayInternal;public ClassJournalCollection(){_arrayInternal = new List<ClassJournal>();}public ClassJournalCollection( IList<ClassJournal> pSource ){_arrayInternal = pSource;if(_arrayInternal == null){_arrayInternal = new List<ClassJournal>();}}public ClassJournal this[int index]{get{return _arrayInternal[index];}set{_arrayInternal[index] = value;}}public int Count { get { return _arrayInternal.Count; } }public bool IsSynchronized { get { return false; } }public object SyncRoot { get { return _arrayInternal; } }public void CopyTo(Array array, int index){ _arrayInternal.CopyTo((ClassJournal[])array, index); }public IEnumerator GetEnumerator() { return _arrayInternal.GetEnumerator(); }public void Add(ClassJournal pClassJournal) { _arrayInternal.Add(pClassJournal); }public void Clear() { _arrayInternal.Clear(); }public IList<ClassJournal> GetList() { return _arrayInternal; } }#endregion}
学生初学必有瑕疵,
恳请斧正。