?? dep.cs
字號:
using System;
namespace WorkFlow.user
{
/// <summary>
/// Dep 的摘要說明。
/// </summary>
public class Dep
{
private long autoid; //部門編號
private string depcode;//部門編碼例如"11" "10"
private string depname;//部門名稱
private long parentid; //上級部門編號
private long principalid;//部門主管編號
private string mess;//部門備注
public static int DEP_CODE_LEN=2;
public Dep(long autoid,string depname,string depcode,long parentid,long principalid,string mess)
{
//
// TODO: 在此處添加構造函數邏輯
//
this.autoid = autoid;
this.depcode = depcode;
this.depname = depname;
this.parentid = parentid;
this.principalid = principalid;
this.mess = mess;
}
public Dep(long autoid,long parentid,string depcode,string depname)
{
this.autoid = autoid;
this.parentid = parentid;
this.depcode = depcode;
this.depname = depname;
}
public long getID()
{
return this.autoid;
}
public string getDepCode()
{
return this.depcode;
}
public string getDepName()
{
return this.depname;
}
public long getParentID()
{
return this.parentid;
}
public long getPrincipalID()
{
return this.principalid;
}
public string getMess()
{
return this.mess;
}
public string getParentCode()
{
if(this.depcode.Length<=Dep.DEP_CODE_LEN) return "";
else return this.depcode.Substring(Dep.DEP_CODE_LEN);
}
public int getCodeLen()
{
return this.depcode.Length;
}
public static string getChildMinCode()
{
string tmp = "";
for(int i=0;i<Dep.DEP_CODE_LEN;i++)
{
tmp+="0";
}
return tmp;
}
public static string getChildMaxCode()
{
string tmp = "";
for(int i=0;i<Dep.DEP_CODE_LEN;i++)
{
tmp+="9";
}
return tmp;
}
public static long getMaxDepBit()
{
long first = 1;
for(int i=0;i<Dep.DEP_CODE_LEN;i++)
first=first*10;
return first;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -