Beispiel #1
0
 public Form_OrderManage()
 {
     InitializeComponent();
     UserManager_Client  = (UserManagerClient)ClientFactory.GetClient(ClientType.Type.UserManager);
     Type_Client         = (TypeClient)ClientFactory.GetClient(ClientType.Type.Type);
     Action_Client       = (ActionClient)ClientFactory.GetClient(ClientType.Type.Action);
     Version_Client      = (VersionClient)ClientFactory.GetClient(ClientType.Type.Version);
     Order_Client        = (OrderClient)ClientFactory.GetClient(ClientType.Type.Order);
     OrderSummery_Client = (OrderSummeryClient)ClientFactory.GetClient(ClientType.Type.OrderSummery);
     ShopID = GlobalParams.ShopID;
     if (ShopID < 0)
     {
         MessageBox.Show("您不属于任何店铺,请联系系统管理员分配您的店铺所属!", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
         this.Close();
     }
     else
     {
         List_Version = Version_Client.SelectAllVersions().Where(P => P.Version_Shop == ShopID).ToList();
     }
     List_Action           = Action_Client.SelectAllActions().ToList();
     List_Type             = Type_Client.SelectAllTypes().ToList();
     List_UserEX           = UserManager_Client.SelectUserEXInfo_All().ToList();
     List_User             = UserManager_Client.SelectUserInfo_All().ToList();
     PL_NewUser.Visible    = false;
     PL_UserResult.Visible = false;
     Bind_Action();
     Bind_Type();
     Bind_Version();
 }
Beispiel #2
0
 /// <summary>
 /// 添加用户按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BT_AddUser_Click(object sender, EventArgs e)
 {
     if (TB_RealName.Text == "" || TB_UserPhone.Text == "" || TB_UserValidation.Text == "")
     {
         MessageBox.Show("您必须完成所有必填项目!!");
         return;
     }
     else
     {
         if (TB_Password.Text.Length < 7)
         {
             MessageBox.Show("密码长度必须大于7位");
             return;
         }
         DialogResult res = MessageBox.Show("您确定您要将现在有信息注册到用户?", "警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
         if (res == DialogResult.OK)
         {
             if (
                 UserSummery_Client.UserReg(new WFpart.UserSummeryService.User_ViewModel()
             {
                 UserName = TB_UserName.Text,
                 UserPassword = TB_Password.Text,
                 Email = TB_Email.Text,
                 Answer = TB_Answer.Text,
                 Question = TB_Question.Text
             },
                                            new WFpart.UserSummeryService.aspnet_UsersEX()
             {
                 User_RealName = TB_RealName.Text,
                 User_Phone = TB_UserPhone.Text,
                 User_Adress = TB_UserAdress.Text,
                 User_Info = TB_UserInfo.Text,
                 User_Validation = TB_UserValidation.Text
             })
                 )
             {
                 MessageBox.Show("用户注册成功!");
                 List_UserEX = UserManager_Client.SelectUserEXInfo_All().ToList();
                 List_User   = UserManager_Client.SelectUserInfo_All().ToList();
             }
             else
             {
                 MessageBox.Show("用户注册失败!");
             }
         }
     }
 }
Beispiel #3
0
        private void BT_Sub_Click(object sender, EventArgs e)
        {
            if (TB_RealName.Text.Trim() == null | TB_Phone.Text.Trim() == null || TB_Validation.Text.Trim() == null)
            {
                MessageBox.Show("请完善至少前三项资料!");
                return;
            }
            else
            {
                if (List_UserEX.Where(P => P.User_Validation == TB_Validation.Text.Trim()).Count() > 0)
                {
                    MessageBox.Show("您的身份证已经注册过,请选择老账户进行订车服务!");
                    return;
                }

                if (UserManager_Client.UserReg(null, new UserManagerService.aspnet_UsersEX()
                {
                    User_RealName = TB_RealName.Text.Trim(),
                    User_Validation = TB_Validation.Text.Trim(),
                    User_Adress = TB_Adress.Text.Trim(),
                    User_Phone = TB_Phone.Text.Trim(),
                    User_Info = TB_Info.Text.Trim()
                }))
                {
                    MessageBox.Show("账号注册成功!");
                    SelectUID   = UserManager_Client.SelectUserEXInfo_All().Where(P => P.User_Validation == TB_Validation.Text.Trim()).Single().User_ID;
                    List_User   = UserManager_Client.SelectUserInfo_All().ToList();
                    List_UserEX = UserManager_Client.SelectUserEXInfo_All().ToList();
                    WFpart.UserManagerService.User_ViewModel _TempUser   = List_User.Where(P => P.UserID == SelectUID).Single();
                    WFpart.UserManagerService.aspnet_UsersEX _TempUserEX = List_UserEX.Where(P => P.User_ID == SelectUID).Single();
                    Label_UserName.Text   = _TempUserEX.User_RealName;
                    Label_Adress.Text     = _TempUserEX.User_Adress;
                    Label_Info.Text       = _TempUserEX.User_Info;
                    Label_Phone.Text      = _TempUserEX.User_Phone;
                    Label_Validation.Text = _TempUserEX.User_Validation;
                    PL_NewUser.Visible    = false;
                    PL_UserResult.Visible = true;
                    RB_NewUser.Visible    = false;
                    RB_OldUser.Visible    = false;
                }
                else
                {
                    MessageBox.Show("账号注册失败!请检查拼写,如问题依旧,请联系管理员!", "错误!!", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                }
            }
        }
Beispiel #4
0
 public Form_UserManage()
 {
     InitializeComponent();
     this.Width         = 320;
     UserSummery_Client = (UserSummeryClient)ClientFactory.GetClient(ClientType.Type.UserSummery);
     UserManager_Client = (UserManagerClient)ClientFactory.GetClient(ClientType.Type.UserManager);
     List_UserEX        = UserManager_Client.SelectUserEXInfo_All().ToList();
     List_User          = UserManager_Client.SelectUserInfo_All().ToList();
 }