Пример #1
0
        protected void Btn_save_Click(object sender, DirectEventArgs e)
        {
            string toTime = DateTime.Now.ToString("HH:mm:ss");
            string sSQL;

            if (sid.Text.Equals(string.Empty))
            {
                sSQL  = "INSERT into pat_patrol(pif_ic, pat_date, pat_time, pat_note, pat_emp) ";
                sSQL += "VALUES('" + _PAT_IC + "','" + _Get_YMD(PAT_DATE2.Text) + "','" + toTime + "','" + TextArea1.Text + "','" + Doct_Name2.Text + "')";
            }
            else
            {
                sSQL  = "UPDATE pat_patrol SET pat_note='" + TextArea1.Text + "', pat_emp='" + Doct_Name2.Text + "', pat_date='" + _Get_YMD(PAT_DATE2.Text) + "' ";
                sSQL += "WHERE sid=" + sid.Text;
            }

            try
            {
                db.Excute(sSQL);
                Common._NotificationShow("<font size=4>储存成功!</font>");
            }
            catch
            {
                Common._NotificationShow("<font size=4>储存失败!</font>");
            }
            Window1.Close();
            show_grid();
        }
 protected void btnClose_Click(object sender, DirectEventArgs e)
 {
     a = "";
     TextField1.Text = "";
     //TextField16.Text = "";
     Window1.Close();
 }
        public void ShowSignIn(Window1 window1)
        {
            signIn signin = new signIn();

            window1.Close();
            signin.Show();
        }
 protected void Edit_Click(object sender, DirectEventArgs e)
 {
     if (txtPwd1.Text == txtPwd2.Text)
     {
         try
         {
             JiaMiJieMi aeskey    = new JiaMiJieMi();
             string     pwdencode = aeskey.Base64Encrypt(aeskey.AES_Encrypt(txtPwd1.Text));
             //string pwd = aeskey.AES_Decrypt(aeskey.Base64Decrypt(pwdencode));
             string sSQL = "UPDATE access_level SET passwd='" + pwdencode + "' ";
             sSQL += "WHERE acclv_id=" + Userid.Text;
             db.Excute(sSQL);
             Window1.Close();
             Common._NotificationShow("密码修改成功!");
         }
         catch (Exception ex)
         {
             Common._NotificationShow("密码修改失败!");
         }
     }
     else
     {
         Common._NotificationShow("请重新输入正确密码!");
         txtPwd1.Focus(true, 100);
     }
 }
        public void ShowSignUp(Window1 window1)
        {
            signUp signup = new signUp();

            window1.Close();
            signup.Show();
        }
        public void ShowHighScore(Window1 window1)
        {
            highScore bxh = new highScore(window1.id, window1.fullname);

            window1.Close();
            bxh.Show();
        }
        protected void Dialysis_detail(object sender, DirectEventArgs e)
        {
            string json = e.ExtraParams["Values"];

            Dictionary <string, string>[] selRow = JSON.Deserialize <Dictionary <string, string>[]>(json);
            _PAT_IC    = selRow[0]["pat_ic"].ToString();
            _PIF_NAME  = selRow[0]["pif_name"].ToString();
            _USER_NAME = selRow[0]["pif_docname"].ToString();
            _PIF_SX    = selRow[0]["pif_sex"].ToString() + "性";

            string sql = "SELECT pif_id, pif_name, pif_docname FROM pat_info ";

            sql += " where pif_ic = '" + _PAT_IC + "' ";
            DataTable dt = db.Query(sql);

            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["pif_docname"].ToString() != null)
                {
                    _PatDocName = dt.Rows[0]["pif_docname"].ToString();
                }
                else
                {
                    _PatDocName = "";
                }
                Session["PAT_ID"] = dt.Rows[0]["pif_id"].ToString();
                _PAT_ID           = Session["PAT_ID"].ToString();

                Store istore = GridList.GetStore();
                istore.RemoveAll();
                Window1.Close();
            }
        }
Пример #8
0
        public void Button1_Click()
        {
            try
            {
                UsuarioLogic usuarioLogic = new UsuarioLogic();
                if (usuarioLogic.Autenticar(this.txtUsername.Text, this.txtPassword.Text) == true)
                {
                    Session["username"] = this.txtUsername.Text;

                    Window1.Close();
                    Response.Redirect("~/Source/Desktop.aspx");
                }
                else
                {
                    log.WarnFormat("Error al intentar autenticar usuario. Username: {0} - Password (Encriptada): {1} .", this.txtUsername.Text, this.txtPassword.Text);

                    this.txtUsername.Clear();
                    this.txtPassword.Clear();
                    X.Msg.Alert("Inicio de Sesión", "El nombre de usuario o contraseña son incorrectos.", "#{txtUsername}.focus();").Show();
                }
            }
            catch (System.Threading.ThreadAbortException tex)
            {
                log.Warn("Error de terminacion de hilo al intentar autenticar usuario. Nota: Este error pudo ser causado por Response.Redirect.", tex);
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al intentar autenticar usuario.", ex);
            }
        }
 protected void btnsure_OnDirectClick(object sender, DirectEventArgs e)
 {
     if (!string.IsNullOrEmpty(PasswordField.Text.Trim()))
     {
         string  pwd    = "";
         BG_User bgUser = BG_UserManager.GetBG_UserByUserID(UserID);
         pwd = bgUser.UserPwd;
         if (bgUser.UserPwd == PasswordField.Text.Trim())
         {
             X.Msg.Alert("系统提示", "密码不能与原密码相同").Show();
             return;
         }
         bgUser.UserPwd = PasswordField.Text.Trim();
         if (BG_UserManager.ModifyBG_User(bgUser))
         {
             X.Msg.Alert("系统提示", "密码修改成功").Show();
             Window1.Close();
         }
         BG_ChangePwd bgChangePwd = new BG_ChangePwd();
         bgChangePwd.UserName = UserName;
         bgChangePwd.CrTime   = DateTime.Now;
         bgChangePwd.DepName  = DepName;
         bgChangePwd.NewPwd   = bgUser.UserPwd;
         bgChangePwd.UserID   = bgUser.UserID;
         bgChangePwd.OldPwd   = pwd;
         BG_ChangePwdManager.AddBG_ChangePwd(bgChangePwd);
     }
 }
        public void ShowMainWindow(Window1 window1)
        {
            MainWindow mainWindow = new MainWindow(window1.comboBox.SelectedIndex,
                                                   window1.comboBox_shapeColor.SelectedIndex, window1.id, window1.fullname);

            window1.Close();
            mainWindow.Show();
        }
Пример #11
0
 protected void BtnLogin_Click(object sender, DirectEventArgs e)
 {
     if (CheckRight())
     {
         e.Success = true;
         Window1.Close();
         X.Redirect("ipad_index.aspx");
     }
     else
     {
         Text_User.Text = "";
         Text_User.Focus(false, 100);
         Common._NotificationShow("请重新输入!");
     }
 }
Пример #12
0
        private void EndRT_Click(object sender, RoutedEventArgs e)
        {
            Shubharealtime.datadownload s = new datadownload();
            s.stopdata();
            this.Close();
            Shubharealtime.Window1 w = new Window1();
            w.Close();



            string filepath = System.Reflection.Assembly.GetExecutingAssembly().Location.ToString();

            System.Diagnostics.Process.Start(filepath);
            Application.Current.Shutdown();
        }
        protected void btnDecrypt_Click(object sender, DirectEventArgs e)
        {
            string wactive_flag = "";
            string wacciv_id    = "";

            if (TextField_UserID.Text == "")
            {
                Common._NotificationShow("请输入正确工号!");
                return;
            }
            else
            {
                string sql = "SELECT a.acclv_fname,a.acclv_funm,a.acclv_id";
                sql += " FROM access_level a ";
                sql += "WHERE a.acclv_stfcode = '" + TextField_UserID.Text + "' ";

                DataTable dt = db.Query(sql);
                if (dt.Rows.Count > 0)
                {
                    wactive_flag    = "1";
                    wacciv_id       = dt.Rows[0]["acclv_id"].ToString();
                    TextField1.Text = TextField1.Text + dt.Rows[0]["acclv_fname"].ToString() + ",";;
                }
                else
                {
                    Common._NotificationShow("工号不存在,请重新输入!");
                    TextField_UserID.Text = "";
                    return;
                }

                if (wactive_flag == "1")
                {
                    sql  = "SELECT a.associate_id,a.associate_active";
                    sql += " FROM associate_list a ";
                    sql += "WHERE a.associate_id     = '" + wacciv_id + "'";
                    sql += "AND   a.associate_active ='A" + "'";
                    DataTable dt1 = db.Query(sql);
                    if (dt1.Rows.Count == 0)
                    {
                        Common._NotificationShow("此工號已關閉,请重新输入!");
                        TextField_UserID.Text = "";
                        return;
                    }
                }
                TextField_UserID.Text = "";
                Window1.Close();
            }
        }
Пример #14
0
        protected override void OnExecute(object param)
        {
            ////IUnityContainer container = LifetimeService.Instance.Container;
            ////IDataService service = container.Resolve<IDataService>();
            ////IUIController controller = container.Resolve<IUIController>();

            ////DialogResult result = System.Windows.Forms.MessageBox.Show("Do you want to close this Application?",
            ////                                        "Close this Application?.",
            ////                                         MessageBoxButtons.YesNo,
            ////                                         MessageBoxIcon.Question);
            ////if (result == DialogResult.No)//save
            ////{
            ////    return;
            ////}

            Window1 appwindow = LifetimeService.Instance.Container.Resolve <Window1>();//21feb2013

            appwindow.Close();
        }
Пример #15
0
        protected void Dialysis_detail(object sender, DirectEventArgs e)
        {
            string json = e.ExtraParams["Values"];

            Dictionary <string, string>[] selRow = JSON.Deserialize <Dictionary <string, string>[]>(json);
            _PAT_ID    = selRow[0]["pat_id"].ToString();
            _PAT_IC    = selRow[0]["pat_ic"].ToString();
            _PIF_NAME  = selRow[0]["pif_name"].ToString();
            _USER_NAME = selRow[0]["pif_docname"].ToString();
            _PIF_SX    = selRow[0]["pif_sex"].ToString() + "性";

            if (LoadPatinfo(_PAT_ID) == true)
            {
                Store istore = GridList.GetStore();
                istore.RemoveAll();
            }
            Window1.Close();
            pifid.Text = _PAT_ID;
        }
Пример #16
0
        protected void text_click(object sender, DirectEventArgs e)
        {
            string key = e.ExtraParams["keynum"].ToString();

            if (key == "13")
            {
                if (CheckRight())
                {
                    e.Success = true;
                    Window1.Close();
                    X.Redirect("ipad_index.aspx");
                }
                else
                {
                    Text_User.Text = "";
                    Text_User.Focus(false, 100);
                    Common._NotificationShow("请重新输入!");
                }
            }
        }
Пример #17
0
    protected void Button7_Click(object sender, EventArgs e)
    {
        string InsertOtvet = "INSERT INTO otveti(otvet, vernyj, ID_voprosy) VALUES (@otvet, @vernyj, @ID_voprosy)"; // получаем вопросы из категории

        using (SqlConnection conect = new SqlConnection(ConfigurationManager.ConnectionStrings["tmsConnectionString"].ConnectionString))
        {
            SqlCommand IO = new SqlCommand(InsertOtvet, conect);
            IO.Parameters.AddWithValue("@otvet", this.txtNewOtvet.Text);
            IO.Parameters.AddWithValue("@vernyj", this.chkMark.Value);
            IO.Parameters.AddWithValue("@ID_voprosy", this.sel.Text);
            try
            {
                conect.Open();
                IO.ExecuteNonQuery();
                Window1.Close();
                Notification.Show(new NotificationConfig
                {
                    Title   = "Сообщение",
                    ShowPin = true,
                    Pinned  = true,
                    Html    = "Ответ <b>" + this.txtNewOtvet.Text + "</b>" + " успешно добавлен"
                });
                conect.Close();
            }
            catch (Exception ex)
            {
                Notification.Show(new NotificationConfig
                {
                    Title   = "Сообщение",
                    ShowPin = true,
                    Pinned  = true,
                    Html    = "Произошла ошибка"
                }
                                  );
            }
        }
    }
Пример #18
0
    private async void ButtonBase_OnClick(object sender, RoutedEventArgs e)
    {
        try
        {
            if (newWindowTask == null)
            {
                newWindowTask = new Task(() =>
                {
                    Dispatcher.Invoke(() =>
                    {
                        var wpfwindow      = new Window1();
                        wpfwindow.WinOwner = this;
                        wpfwindow.Show();

                        wpfwindow.WinOwner.Closed += (o, args) =>
                        {
                            wpfwindow.Close();
                            //newWindowTask.Abort();
                        };
                    }, DispatcherPriority.Render);
                });
                newWindowTask.Start();
            }
            else if (newWindowTask.Status == TaskStatus.RanToCompletion)
            {
                foreach (var window in WinOwnerCollection)
                {
                    window.Activate();
                }
            }
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
        }
    }
 public void ExecuteOkCommand(object obj)
 {
     mView.DialogResult = true;
     mView.Close();
 }
Пример #20
0
 protected void BtnCancel_Click(object sender, DirectEventArgs e)
 {
     Window1.Close();
 }
        protected void btnDecrypt_Click(object sender, DirectEventArgs e)
        {
            //if (TextField1.Text == "" || TextField16.Text == "")
            if (TextField1.Text == "")
            {
                _ErrorMsgShow("请输入工号!");
                return;
            }
            else
            {
                DBMysql db  = new DBMysql();
                string  sql = "SELECT a.acclv_fname,a.acclv_funm ";
                sql += "  FROM access_level a ";
                sql += "where a.acclv_stfcode = '" + TextField1.Text.Replace("'", "''") + "' ";
                //sql += "  and a.acclv_funm = '" + TextField16.Text.Replace("'", "''") + "' ";


                DataTable dt = db.Query(sql);
                if (dt.Rows.Count == 1)
                {
                    if (a == "TextField19")
                    {
                        TextField19.Text = dt.Rows[0]["acclv_fname"].ToString();
                    }
                    else if (a == "TextField20")
                    {
                        TextField20.Text = dt.Rows[0]["acclv_fname"].ToString();
                    }
                    else if (a == "TextField21")
                    {
                        TextField21.Text = dt.Rows[0]["acclv_fname"].ToString();
                    }
                    else if (a == "TextField17")
                    {
                        TextField17.Text = dt.Rows[0]["acclv_fname"].ToString();
                    }
                    else if (a == "TextField22")
                    {
                        TextField22.Text = dt.Rows[0]["acclv_fname"].ToString();
                    }
                    else if (a == "TextField23")
                    {
                        TextField23.Text = dt.Rows[0]["acclv_fname"].ToString();
                    }
                }
                else
                {
                    //AlexShen 20151210
                    //sql = "SELECT a.acclv_fname,a.acclv_funm ";
                    //sql += "  FROM access_level a ";
                    //sql += "where a.acclv_stfcode = '" + TextField1.Text.Replace("'", "''") + "' ";
                    //dt = db.Query(sql);
                    //if (dt.Rows.Count > 0)
                    //{
                    //_ErrorMsgShow("密码错误请重新输入!");
                    //TextField16.Text = "";

                    //return;
                    //}
                    //else
                    {
                        _ErrorMsgShow("登入失败请重新输入!");
                        //TextField16.Text = "";
                        TextField1.Text = "";
                        return;
                    }
                }

                a = "";
                TextField1.Text = "";
                //TextField16.Text = "";
                Window1.Close();
            }
        }
Пример #22
0
 protected void BtnQueryPat_Click(object sender, DirectEventArgs e)
 {
     FILL_BED();
     Window1.Close();
     cb_patlist.Text = "";
 }
 protected void BtnCancel_Click(object sender, DirectEventArgs e)
 {
     Window1.Close();
     ClearWindow();
     this.btnAdd.Enable(true);
 }
Пример #24
0
 protected void btnClose_Click(object sender, DirectEventArgs e)
 {
     TextField_UserID.Text = "";
     Window1.Close();
 }
        protected void BtnAccept_Click(object sender, DirectEventArgs e)
        {
            DataTable dt;
            string    sql = "";

            sql  = "SELECT dv_id FROM dv_05 ";
            sql += "WHERE infoDate = '" + _Get_YMD2(info_date.Text) + "'";
            dt   = db.Query(sql);
            if (dt.Rows.Count > 0)
            {
                string index = dt.Rows[0]["dv_id"].ToString();

                sql  = "UPDATE dv_05 ";
                sql += "SET infoDate='" + _Get_YMD2(info_date.Text) + "', ";
                sql += "CenterArea='" + txt_centerArea.Text + "', ";
                sql += "DialysisArea='" + txt_dialysisArea.Text + "', ";
                sql += "BedZone1='" + txt_bedZone1.Text + "', ";
                sql += "BedZone2='" + txt_bedZone2.Text + "', ";
                sql += "BedZone3='" + txt_bedZone3.Text + "', ";
                sql += "BedZone4='" + txt_bedZone4.Text + "', ";
                sql += "dvKind1='" + txt_dvKind1.Text + "', ";
                sql += "dvKind2='" + txt_dvKind2.Text + "', ";
                sql += "dvKind3='" + txt_dvKind3.Text + "', ";
                sql += "dvKind4='" + txt_dvKind4.Text + "', ";
                sql += "Eng1='" + txt_engineer1.Text + "', ";
                sql += "Eng2='" + txt_engineer2.Text + "', ";
                sql += "Eng3='" + txt_engineer3.Text + "', ";
                sql += "Eng4='" + txt_engineer4.Text + "' ";
                sql += "WHERE dv_id='" + index + "';";
            }
            else
            {
                sql  = "INSERT INTO dv_05 ";
                sql += "(infoDate, CenterArea, DialysisArea, BedZone1, BedZone2, BedZone3, BedZone4, dvKind1, dvKind2, dvKind3, dvKind4, Eng1, Eng2, Eng3, Eng4) ";
                sql += "VALUES ('" + _Get_YMD2(info_date.Text) + "','";
                sql += txt_centerArea.Text + "','";
                sql += txt_dialysisArea.Text + "','";
                sql += txt_bedZone1.Text + "','";
                sql += txt_bedZone2.Text + "','";
                sql += txt_bedZone3.Text + "','";
                sql += txt_bedZone4.Text + "','";
                sql += txt_dvKind1.Text + "','";
                sql += txt_dvKind2.Text + "','";
                sql += txt_dvKind3.Text + "','";
                sql += txt_dvKind4.Text + "','";
                sql += txt_engineer1.Text + "','";
                sql += txt_engineer2.Text + "','";
                sql += txt_engineer3.Text + "','";
                sql += txt_engineer4.Text + "');";
            }
            try
            {
                db.Excute(sql);
            }
            catch
            {
            }
            ClearWindow();
            Window1.Close();
            GridPanelBind();
            this.btnAdd.Enable(true);
        }