Beispiel #1
0
        /// <summary>
        /// 更新Email地址
        /// </summary>
        public bool UpdateEmail(int id, string mail)
        {
            M_MailManage mm = GetSelect(id);

            mm.Email = mail;
            return(GetUpdate(mm));
        }
Beispiel #2
0
        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());
        }
Beispiel #3
0
        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());
        }
Beispiel #4
0
        /// <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);
        }
Beispiel #5
0
 public bool UpdateByID(M_MailManage model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters()));
 }
Beispiel #6
0
 public bool GetUpdate(M_MailManage model)
 {
     return(UpdateByID(model));
 }
Beispiel #7
0
 public int GetInsert(M_MailManage model)
 {
     return(insert(model));
 }
Beispiel #8
0
 public int insert(M_MailManage model)
 {
     return(Sql.insert(strTableName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
Beispiel #9
0
 public bool UpdateByID(M_MailManage model)
 {
     return(DBCenter.UpdateByID(model, model.ID));
 }
Beispiel #10
0
 public int insert(M_MailManage model)
 {
     return(DBCenter.Insert(model));
 }