Exemple #1
0
        protected void BindDataList()
        {
            SB_UserMEL userm = new SB_UserMEL();

            DataSet ds = userm.GetPageList(this.AspNetPager1.CurrentPageIndex, string.Empty, OrderType.desc);

            if (ds != null)
            {
                this.AspNetPager1.RecordCount = PagerInfo.GetRecordCount(ds);

                this.rptDataList.DataSource = ds;
                this.rptDataList.DataBind();
            }
        }
Exemple #2
0
        protected void LnkBtnDelete_Command(object sender, CommandEventArgs e)
        {
            string     cn     = e.CommandName;
            string     cnArgs = e.CommandArgument.ToString();
            SB_UserMEL userM  = new SB_UserMEL();
            int        flag;

            using (TransactionScope scope = new TransactionScope())
            {
                switch (cn)
                {
                case "Stop":
                    userM.ID = long.Parse(cnArgs);
                    userM.ExecNonQuery(3, out flag);

                    SB_UserEL user = new SB_UserEL()
                    {
                        Valid  = 0,
                        MainID = userM.ID
                    };

                    user.ExecNonQuery(25, out flag);

                    BindDataList();
                    break;

                case "Enable":
                    userM.ID = long.Parse(cnArgs);
                    userM.ExecNonQuery(31, out flag);

                    SB_UserEL userE = new SB_UserEL()
                    {
                        Valid  = 1,
                        MainID = userM.ID
                    };

                    userE.ExecNonQuery(25, out flag);

                    BindDataList();

                    break;
                }

                scope.Complete();
            }
        }
Exemple #3
0
        protected string ValidateInput()
        {
            string tips = string.Empty;

            if (this.txtSBName.Text.Trim() == string.Empty)
            {
                tips += "企业名称不能为空!\\n";
            }
            else
            {
                //SB_UserMEL userM = new SB_UserMEL()
                //{
                //    SBName = this.txtSBName.Text.Trim()
                //};

                //userM.ExecuteEL(43);

                //if (!string.IsNullOrEmpty(userM.ApplyIP))
                //{
                //    tips += "企业名称已经注册,不能重复注册!\\n";
                //}
            }

            if (this.txtUserCode.Text.Trim() != string.Empty)
            {
                if (PageValidate.IsPhone(this.txtUserCode.Text.Trim()))
                {
                    SB_UserMEL userM = new SB_UserMEL()
                    {
                        SBMobile = this.txtUserCode.Text.Trim()
                    };

                    userM.ExecuteEL(44);

                    if (!string.IsNullOrEmpty(userM.ApplyIP))
                    {
                        tips += "手机号已在服务商注册,不能重复注册!\\n";
                    }

                    SB_UserEL user = new SB_UserEL()
                    {
                        UserCode = this.txtUserCode.Text.Trim()
                    };

                    user.ExecuteEL(41);

                    if (!string.IsNullOrEmpty(user.UserName))
                    {
                        tips += "手机号已作为账户被注册过,不能重复注册!\\n";
                    }
                }
                else
                {
                    tips += "手机号格式输入不正确,请重新输入!\\n";
                }
            }
            else
            {
                tips += "手机号不能为空!\\n";
            }

            if (this.txtUserName.Text.Trim() == string.Empty)
            {
                tips += "管理员姓名不能为空!";
            }

            return(tips);
        }