本文整理汇总了C#中BLL.users.GetOnlyCodeNumber方法的典型用法代码示例。如果您正苦于以下问题:C# BLL.users.GetOnlyCodeNumber方法的具体用法?C# BLL.users.GetOnlyCodeNumber怎么用?C# BLL.users.GetOnlyCodeNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.users
的用法示例。
在下文中一共展示了BLL.users.GetOnlyCodeNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoAdd
private bool DoAdd()
{
bool result = true;
Model.users model = new Model.users();
BLL.users bll = new BLL.users();
model.group_id = int.Parse(ddlGroupId.SelectedValue);
model.is_lock = int.Parse(rblIsLock.SelectedValue);
int number = bll.GetOnlyCodeNumber();
model.user_name = "sxzh" + number.ToString();//txtUserName.Text.Trim();
model.password = DESEncrypt.Encrypt(txtPassword.Text);
model.email = txtEmail.Text;
model.nick_name = txtNickName.Text;
model.avatar = txtAvatar.Text;
model.sex = rblSex.SelectedValue;
DateTime _birthday;
if (DateTime.TryParse(txtBirthday.Text.Trim(), out _birthday))
{
model.birthday = _birthday;
}
model.telphone = txtTelphone.Text.Trim();
model.mobile = txtMobile.Text.Trim();
model.qq = txtQQ.Text;
model.address = txtAddress.Text.Trim();
model.amount = decimal.Parse(txtAmount.Text.Trim());
model.point = int.Parse(txtPoint.Text.Trim());
model.exp = 0;// int.Parse(txtExp.Text.Trim());
model.reg_time = DateTime.Now;
model.reg_equ = txtRegEqu.Text.Trim();
model.guid_card = txtGuidCard.Text.Trim();
model.card = txtCard.Text.Trim();
model.age = int.Parse(txtAge.Text.Trim());
model.work_type = int.Parse(rblWorkType.SelectedValue);
model.description = Utils.ToHtml(txtContent.Text.Trim());
model.work_age = ddlWorkAge.SelectedValue.ToString();
if (bll.Add(model) < 1)
{
result = false;
}
return result;
}