本文整理汇总了C#中Js.BLL.BaseDal.GetMaxID方法的典型用法代码示例。如果您正苦于以下问题:C# BaseDal.GetMaxID方法的具体用法?C# BaseDal.GetMaxID怎么用?C# BaseDal.GetMaxID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Js.BLL.BaseDal
的用法示例。
在下文中一共展示了BaseDal.GetMaxID方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (Session["cnKey"] != null)
cnKey = Session["cnKey"].ToString();
ID = Request.QueryString["ID"] + "";
FormID = Request.QueryString["FormID"] + "";
if (!IsPostBack)
{
ViewState["StrWhere"] = string.Format(" DepartmentID='{0}' and EnterpriseID='{1}'", ID, Session["EnterpriseID"].ToString());
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
if (ID != "")
{
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
this.txtDepartmentID.ReadOnly = true;
}
else
{
this.txtDepartmentID.Text = dal.GetMaxID("EnterpriseID='" + Session["EnterpriseID"].ToString() + "'");
this.txtEnterpriseID.Text = Session["EnterpriseID"].ToString();
this.txtEnterpriseName.Text = Session["EnterpriseName"].ToString();
this.txtLastModifyUserName.Text = Session["User"].ToString();
this.txtLastModifyDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
this.txtCreateUserName.Text = Session["User"].ToString();
this.txtCreateDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
}
}
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
BillID = Request.QueryString["BillID"] + "";
FormID = Request.QueryString["FormID"] + "";
if (!IsPostBack)
{
ViewState["StrWhere"] = string.Format(" BillID='{0}'", BillID);
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
if (BillID != "")
{
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
this.txtBillID.ReadOnly = true;
}
else
{
this.txtBillID.Text = dal.GetMaxID();
this.txtLastModifyUserName.Text = Session["User"].ToString();
this.txtLastModifyDate.Text = DateTime.Now.ToString(Js.Com.User.strDateFormat);
this.txtCreateUserName.Text = Session["User"].ToString();
this.txtCreateDate.Text = DateTime.Now.ToString(Js.Com.User.strDateFormat);
}
}
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
ID = Request.QueryString["ID"] + "";
FormID = Request.QueryString["FormID"] + "";
if (!IsPostBack)
{
ViewState["StrWhere"] = string.Format(" ProductionUnitID='{0}'", ID);
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
if (ID != "")
{
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
this.txtProductionUnitID.ReadOnly = true;
}
else
{
this.txtProductionUnitID.Text = dal.GetMaxID();
this.txtLastModifyUserName.Text = Session["User"].ToString();
this.txtLastModifyDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
this.txtCreateUserName.Text = Session["User"].ToString();
this.txtCreateDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
}
//BindEdll();
}
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
ID = Request.QueryString["ID"] + "";
FormID = Request.QueryString["FormID"] + "";
if (!IsPostBack)
{
ViewState["StrWhere"] = string.Format(" StateID='{0}'", ID);
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
if (ID != "")
{
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
this.txtStateListID.ReadOnly = true;
this.txtStateListID.CssClass = "TextRead";
}
else
{
this.txtStateListID.Text = dal.GetMaxID();
this.ddlStyle.SelectedIndex = 1;
this.txtLastModifyUserName.Text = Session["User"].ToString();
this.txtLastModifyDate.Text =ToYMDHM( DateTime.Now);
this.txtCreateUserName.Text = Session["User"].ToString();
this.txtCreateDate.Text =ToYMDHM( DateTime.Now);
}
BindEdll();
txtStateListID.MaxLength = 2;//代碼
txtStateName.MaxLength = 8;//企業用戶名稱
txtMemo.MaxLength = 300;//狀態說明
if (this.ddlStyle.SelectedIndex == 0)
{
txtStateListID.ReadOnly = true;
txtStateListID.CssClass = "TextRead";
txtStateName.ReadOnly = true;
txtStateName.CssClass = "TextRead";
ddlStyle.Enabled = false;
chkImageProvider.Enabled = false;
}
}
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
ID = Request.QueryString["ID"] + "";
FormID = Request.QueryString["FormID"] + "";
if (!IsPostBack)
{
BindEdll();
ViewState["StrWhere"] = string.Format(" MemberID='{0}'", ID);
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
if (ID != "")
{
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
this.txtMemberID.ReadOnly = true;
}
else
{
this.txtMemberID.Text = dal.GetMaxID();
}
}
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
ID = Request.QueryString["ID"] + "";
FormID = Request.QueryString["FormID"] + "";
if (!IsPostBack)
{
ViewState["StrWhere"] = string.Format(" AnnounceID='{0}'", ID);
if (Session["UserType"].ToString() == "BU")
{
this.txtAnnounceFlag.Text = Resources.Resource.AnnounceFlag1;
Js.BLL.BusinessUnit.CompanyDal cdal = new Js.BLL.BusinessUnit.CompanyDal();
Js.Model.BusinessUnit.CompanyInfo model = cdal.GetModel();
this.txtAnnounceUnitNo.Text = model.CompanyNo;
Js.BLL.Account.UserDal udal = new Js.BLL.Account.UserDal();
Js.Model.Account.UsersInfo umodel = udal.GetModel(Session["User"].ToString());
this.txtAnnouncer.Text = umodel.PersonName;
}
else
{
this.txtAnnounceFlag.Text = Resources.Resource.AnnounceFlag2;
this.txtAnnounceUnitNo.Text = Session["EnterpriseID"].ToString();
Js.BLL.Account.UserDal udal = new Js.BLL.Account.UserDal(Session["EnterpriseID"].ToString());
Js.Model.Account.UsersInfo umodel = udal.GetModel(Session["User"].ToString());
this.txtAnnouncer.Text = umodel.PersonName;
}
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
string strWhere = " AnnounceID like '" + this.txtAnnounceUnitNo.Text + DateTime.Now.ToString("yyyyMMdd") + "%'";
dal.GetMaxID(strWhere);
this.txtAnnounceID.Text = dal.GetMaxID(strWhere);
if(this.txtAnnounceID.Text.Length<=0)
this.txtAnnounceID.Text =this.txtAnnounceUnitNo.Text + DateTime.Now.ToString("yyyyMMdd") + "0001";
this.txtAnnouncerUserName.Text = Session["User"].ToString();
this.txtSource.Text = Resources.Resource.AnnounceSource1;
BindGrid();
}
}
示例7: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
ID = Request.QueryString["ID"] + "";
FormID = Request.QueryString["FormID"] + "";
if (!IsPostBack)
{
BindDropDownList();
ViewState["StrWhere"] = string.Format(" StyleID='{0}'", ID);
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID,cnKey);
if (ID != "")
{
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
this.txtStyleID.ReadOnly = true;
}
else
{
this.txtStyleID.Text = dal.GetMaxID();
this.txtLastModifyUserName.Text = Session["User"].ToString();
this.txtLastModifyDate.Text = ToYMDHM(DateTime.Now);
this.txtCreateUserName.Text = Session["User"].ToString();
this.txtCreateDate.Text = ToYMDHM(DateTime.Now);
}
BindOther();
}
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
ID = Request.QueryString["ID"] + "";
FormID = Request.QueryString["FormID"] + "";
if (!IsPostBack)
{
ViewState["StrWhere"] = string.Format(" EnterpriseID='{0}'", ID);
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
BindDropDownList();
this.ddlCategoryID.Enabled = false;
this.ddlEnableMonths.Enabled = false;
if (ID != "")
{
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
this.txtEnterpriseID.ReadOnly = true;
}
else
{
this.txtEnterpriseID.Text = dal.GetMaxID();
this.txtLastModifyUserName.Text = Session["User"].ToString();
this.txtLastModifyDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
this.txtCreateUserName.Text = Session["User"].ToString();
this.txtCreateDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
}
}
}
示例9: SystemMessage
public static void SystemMessage(string[] ToUserName, int ReceiverFlag, string[] ReceiveUnitNo, string Title, string Content)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal("Sys_AnnounceMessage");
string strAnnounceUnitNo = "";
string strAnnounceID = "";
string strAnnouncer = "";
string strWhere = " AnnounceID like '" + strAnnounceUnitNo + DateTime.Now.ToString("yyyyMMdd") + "%'";
dal.GetMaxID(strWhere);
strAnnounceID = dal.GetMaxID(strWhere);
if (strAnnounceID.Length <= 0)
strAnnounceID = strAnnounceUnitNo + DateTime.Now.ToString("yyyyMMdd") + "0001";
if (HttpContext.Current.Session["UserType"].ToString() == "BU")
{
Js.BLL.BusinessUnit.CompanyDal cdal = new Js.BLL.BusinessUnit.CompanyDal();
Js.Model.BusinessUnit.CompanyInfo model = cdal.GetModel();
strAnnounceUnitNo = model.CompanyNo;
Js.BLL.Account.UserDal udal = new Js.BLL.Account.UserDal();
Js.Model.Account.UsersInfo umodel = udal.GetModel(HttpContext.Current.Session["User"].ToString());
strAnnouncer = umodel.PersonName;
}
else
{
strAnnounceUnitNo = HttpContext.Current.Session["EnterpriseID"].ToString();
Js.BLL.Account.UserDal udal = new Js.BLL.Account.UserDal(HttpContext.Current.Session["EnterpriseID"].ToString());
Js.Model.Account.UsersInfo umodel = udal.GetModel(HttpContext.Current.Session["User"].ToString());
strAnnouncer = umodel.PersonName;
}
DataTable dt = dal.GetRecord("1=2");
DataRow dr = dt.NewRow();
dr["AnnounceID"] = strAnnounceID;
dr["Announcer"] = strAnnouncer;
if (HttpContext.Current.Session["UserType"].ToString() == "BU")
dr["AnnounceFlag"] = 0;
else
dr["AnnounceFlag"] = 1;
dr["AnnounceUnitNo"] = strAnnounceUnitNo;
dr["AnnouncerUserName"] = HttpContext.Current.Session["User"].ToString();
dr["Source"] = 1;
dr["AnnounceDate"] = DateTime.Now;
dr["Title"] = Title;
dr["Contents"] = Content;
dal.Add(dr);
DataTable dtSub = dal.GetSubDetail("").Tables[0];
for (int i = 0; i < ToUserName.Length; i++)
{
DataRow subdr = dtSub.NewRow();
subdr["AnnounceID"] = strAnnounceID;
subdr["ReceiverUserName"] = ToUserName[i];
subdr["ReceiverFlag"] = ReceiverFlag;
subdr["ReceiveUnitNo"] = ReceiveUnitNo[i];
Js.BLL.Account.UserDal udal = new Js.BLL.Account.UserDal(ReceiveUnitNo[i]);
Js.Model.Account.UsersInfo umodel = udal.GetModel(ToUserName[i]);
subdr["Receiver"] = umodel.PersonName;
dtSub.Rows.Add(subdr);
}
dal.SaveDetail(dtSub, "");
}
示例10: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
UserName = Request.QueryString["UserName"] + "";
FormID = Request.QueryString["FormID"] + "";
NodeUser = Request.QueryString["NodeUser"] + "";
if (!IsPostBack)
{
ViewState["StrWhere"] = string.Format(" UserName='{0}'", NodeUser);
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
this.txtPersonName.Attributes.Add("readonly", "true");
this.ddlUserLevel.Enabled = false;
if (UserName != "")
{
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
this.txtUserName.ReadOnly = true;
if (this.txtCreateDate.Text.Trim().Length == 0)
{
this.txtCreateUserName.Text = Session["User"].ToString();
this.txtCreateDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
}
}
else
{
//if (NodeUser.ToLower() == "administrator")
if (Session["User"].ToString().ToLower() == "administrator")
this.ddlUserLevel.SelectedIndex = 1;
else
this.ddlUserLevel.SelectedIndex = 2;
this.txtUserName.Text = dal.GetMaxID();
this.txtLastModifyUserName.Text = Session["User"].ToString();
this.txtLastModifyDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
this.txtCreateUserName.Text = Session["User"].ToString();
this.txtCreateDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
}
BindDropDownList();
}
}