Esempio n. 1
0
        private void toolBar1_ToolbarItemClick_1(object sender, ToolbarClickEventArgs e)
        {
            switch (e.Name)
            {
            case "My":
                SmobilerMyForm my = new SmobilerMyForm();
                this.Show(my, (obj, arage) => { this.Close(); });
                //this.Show(my);
                break;

            case "Order":
                OrderListForm orderForm1 = new OrderListForm(_userInfo);
                this.Show(orderForm1, (obj, arage) => { this.Close(); });
                //Show(orderForm1);
                break;

            case "Home":
                SmobilerFirst first = new SmobilerFirst();
                this.Show(first, (obj, arage) => { this.Close(); });
                //this.Show(first);
                break;
            }
        }
Esempio n. 2
0
        private void btn_login_Press(object sender, EventArgs e)
        {
            string json               = helper.Get("/Menu/GetUser");
            Data   data               = JsonConvert.DeserializeObject <Data>(json);
            string stringJson         = JsonConvert.SerializeObject(data.Result);
            List <Base_UserInfo> list = JsonConvert.DeserializeObject <List <Base_UserInfo> >(stringJson);

            string        User_Name     = txtUserName.Text;
            string        pwd           = txtUserPwd.Text;
            Base_UserInfo base_UserInfo = list.Where(m => m.User_Name == User_Name && m.User_Pwd == pwd).FirstOrDefault();

            if (base_UserInfo == null)
            {
                MessageBox.Show("不存在");
                return;
            }
            else
            {
                //传递用户信息到首页
                SmobilerFirst smobilerFirst = new SmobilerFirst(base_UserInfo);
                Show(smobilerFirst);
            }
        }
        /// <summary>
        /// 返回首页
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void back_my_Press(object sender, EventArgs e)
        {
            SmobilerFirst first = new SmobilerFirst();

            Show(first);
        }