imeDialog
Inheritance: MahApps.Metro.Controls.MetroWindow, System.Windows.Markup.IComponentConnector
Exemple #1
0
 /// <summary>
 /// 模拟登陆
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnLogin_Click(object sender, RoutedEventArgs e)
 {
     if (txtUserName.Text.Equals(""))
     {
         txtUserName.Focus();
         dialog.imeDialog i = new dialog.imeDialog("您输入您的用户名");
         i.ShowDialog();
         return;
     }
     if (txtPassword.Password.Equals(""))
     {
         txtPassword.Focus();
         dialog.imeDialog i = new dialog.imeDialog("您输入您的密码");
         i.ShowDialog();
         return;
     }
     if (txtUserName.Text.ToUpper().Equals("ADMIN") && txtPassword.Password.ToUpper().Equals("ADMIN"))
     {
         this.DialogResult = Convert.ToBoolean(1);
         this.Close();
     }
     else
     {
         dialog.imeDialog i = new dialog.imeDialog("您输入的用户名或密码有误");
         i.ShowDialog();
     }
 }
Exemple #2
0
        /// <summary>
        /// 管理面板
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void n_admin_Click(object sender, RoutedEventArgs e)
        {
            dialog.pswdDialog p = new dialog.pswdDialog();
            bool?ret            = p.ShowDialog();

            if (true == ret)
            {
                manager.admin a = new manager.admin();
                a.ShowDialog();
            }
            else
            {
                dialog.imeDialog i = new dialog.imeDialog("管理员密码错误");
                i.ShowDialog();
            }
        }
Exemple #3
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void n_del_Click(object sender, RoutedEventArgs e)
 {
     if (!goodsList_selected.Equals(""))
     {
         string             getList = goodsList_selected;
         string             mesg    = "请确认是否删除商品【 " + getList.Split(',')[2] + " * " + getList.Split(',')[3] + " 】";
         dialog.imeDialogYN iyn     = new dialog.imeDialogYN(mesg);
         bool?ret = iyn.ShowDialog();
         if (true == ret)
         {
             gridDel(getList.Split(',')[0]);
             gridNew();
             dialog.imeDialog i = new dialog.imeDialog("删除成功!");
             i.ShowDialog();
         }
     }
     else
     {
         dialog.imeDialog i = new dialog.imeDialog("请选择需要处理的商品!");
         i.ShowDialog();
     }
 }
Exemple #4
0
 /// <summary>
 /// 数量[非最大化下]
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void n_counts_Click(object sender, RoutedEventArgs e)
 {
     if (!goodsList_selected.Equals(""))
     {
         dialog.editDialog ed = new dialog.editDialog(goodsList_selected);
         ed.Owner = this;
         bool?ret = ed.ShowDialog();
         if (true == ret)
         {
             gridEdit(goodsList_selected.Split(',')[0], goodsNum);
             gridNew();
             string[] strArray = goodsList_selected.Split(',');
             strArray[3]        = goodsNum;
             goodsList_selected = string.Join(",", strArray);
             dialog.imeDialog i = new dialog.imeDialog("商品编辑成功!");
             i.ShowDialog();
         }
     }
     else
     {
         dialog.imeDialog i = new dialog.imeDialog("请选择需要处理的商品行!");
         i.ShowDialog();
     }
 }