/// <summary> /// 更新Email地址 /// </summary> public bool UpdateEmail(int id, string mail) { M_MailManage mm = GetSelect(id); mm.Email = mail; return(GetUpdate(mm)); }
protected void LinkButton1_Click(object sender, EventArgs e) { LinkButton lb = (LinkButton)sender; GridViewRow det = (GridViewRow)lb.NamingContainer; M_MailManage mm = mmbll.GetSelect(int.Parse(EGV.DataKeys[det.RowIndex].Value.ToString())); mm.State = true; mmbll.GetUpdate(mm); Bind(mmbll.Select_All()); }
protected void Button2_Click(object sender, EventArgs e) { M_MailManage mm = new M_MailManage(); mm.AddTime = DateTime.Now; mm.BackMostTime = DateTime.Now; mm.Email = txtMail.Text.Trim().ToLower(); mm.Postfix = txtMail.Text.Substring(txtMail.Text.Trim().LastIndexOf("@") + 1, txtMail.Text.Length - (txtMail.Text.Trim().LastIndexOf("@") + 1)); mm.State = true; mm.UserID = new B_Admin().GetAdminLogin().AdminId; if (mm.Email != "") { if (mmbll.SelByEmail(mm.Email).Rows.Count == 0) { mmbll.GetInsert(mm); } } Bind(mmbll.Select_All()); }
/// <summary> /// 确认邮箱 /// </summary> /// <param name="id">邮箱ID</param> /// <param name="mail"></param> /// <returns></returns> public M_MailManage ConfirmEmail(string mail) { string sql = "Select * From " + strTableName + " Where Email=@mail And State=0"; SqlParameter[] sp = new SqlParameter[] { new SqlParameter("mail", mail) }; DataTable dt = SqlHelper.ExecuteTable(CommandType.Text, sql, sp); M_MailManage returnm = new M_MailManage(); if (dt.Rows.Count > 0) { returnm = GetSelects(int.Parse(dt.Rows[0]["ID"].ToString())); } else { returnm = null; } if (dt != null) { dt.Dispose(); } return(returnm); }
public bool UpdateByID(M_MailManage model) { return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters())); }
public bool GetUpdate(M_MailManage model) { return(UpdateByID(model)); }
public int GetInsert(M_MailManage model) { return(insert(model)); }
public int insert(M_MailManage model) { return(Sql.insert(strTableName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model))); }
public bool UpdateByID(M_MailManage model) { return(DBCenter.UpdateByID(model, model.ID)); }
public int insert(M_MailManage model) { return(DBCenter.Insert(model)); }