Example #1
0
 public void masuk()
 {
    if (!(txtUserName.Text == "" || passwordBox1.Password == ""))
    {
       if (F.checkPass(txtUserName.Text, passwordBox1.Password))
       {
          if (txtUserName.Text == "admin")
          {
             Admin a = new Admin();
             a.Show();
             this.Hide();
          }
          siapa.anda = txtUserName.Text;
          string pilih = txtUserName.Text;
          switch (pilih[1])
          {
             case '1':
                //MessageBox.Show("Dokter");
                Dokter d = new Dokter();
                d.Show();
                this.Hide();
                break;
             case '2':
                //MessageBox.Show("Perawat");
                Perawat p = new Perawat();
                p.Show();
                this.Hide();
                break;
             case '3':
                //MessageBox.Show("Karyawan");
                Karyawan k = new Karyawan();
                k.Show();
                this.Hide();
                break;
             case '4':
                //MessageBox.Show("Pasien");
                Pasien s = new Pasien();
                s.Show();
                this.Hide();
                break;
          }
       }
       else if (txtUserName.Text == "su" && passwordBox1.Password == "superuser")
       {
          Admin a = new Admin();
          a.Show();
          this.Hide();
       }
       else MessageBox.Show("Username dan Password tidak cocok", "Peringatan", MessageBoxButton.OK, MessageBoxImage.Warning);
    }
    else if (txtUserName.Text == "" && !(passwordBox1.Password == ""))
       MessageBox.Show("username kosong");
    else if (passwordBox1.Password == "" && !(txtUserName.Text == ""))
       MessageBox.Show("password kosong");
    else MessageBox.Show("username & password kosong");
 }
Example #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.pasien = ((TCHusada.Pasien)(target));
     return;
     case 2:
     this.FormFade = ((System.Windows.Media.Animation.Storyboard)(target));
     return;
     case 3:
     this.FormFadeAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target));
     return;
     case 4:
     this.imgBackground = ((System.Windows.Controls.Image)(target));
     return;
     case 5:
     this.labeljam = ((System.Windows.Controls.Label)(target));
     return;
     case 6:
     this.labellogin = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.image1 = ((System.Windows.Controls.Image)(target));
     
     #line 32 "..\..\..\Pasien.xaml"
     this.image1.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.image1_MouseDown);
     
     #line default
     #line hidden
     return;
     case 8:
     this.tblogout = ((System.Windows.Controls.Label)(target));
     
     #line 33 "..\..\..\Pasien.xaml"
     this.tblogout.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.tblogout_MouseDown);
     
     #line default
     #line hidden
     return;
     case 9:
     this.labelpengguna = ((System.Windows.Controls.Label)(target));
     return;
     case 10:
     this.tblexit = ((System.Windows.Controls.Label)(target));
     
     #line 35 "..\..\..\Pasien.xaml"
     this.tblexit.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.tblexit_MouseDown);
     
     #line default
     #line hidden
     return;
     case 11:
     this.tabControl1 = ((System.Windows.Controls.TabControl)(target));
     return;
     case 12:
     this.tabItemSaya = ((System.Windows.Controls.TabItem)(target));
     return;
     case 13:
     this.groupBoxTT = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 14:
     this.labelniptt = ((System.Windows.Controls.Label)(target));
     return;
     case 15:
     this.labelnamtt = ((System.Windows.Controls.Label)(target));
     return;
     case 16:
     this.labelalatt = ((System.Windows.Controls.Label)(target));
     return;
     case 17:
     this.labelklmtt = ((System.Windows.Controls.Label)(target));
     return;
     case 18:
     this.labeltlptt = ((System.Windows.Controls.Label)(target));
     return;
     case 19:
     this.labeltgltt = ((System.Windows.Controls.Label)(target));
     return;
     case 20:
     this.textBoxniptt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 21:
     this.textBoxnamtt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 22:
     this.textBoxalatt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 23:
     this.textBoxklmtt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 24:
     this.textBoxtlptt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 25:
     this.datemsktt = ((System.Windows.Controls.DatePicker)(target));
     return;
     case 26:
     this.groupgntp = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 27:
     this.gantibtn = ((System.Windows.Controls.Button)(target));
     
     #line 57 "..\..\..\Pasien.xaml"
     this.gantibtn.Click += new System.Windows.RoutedEventHandler(this.gantibtn_Click);
     
     #line default
     #line hidden
     return;
     case 28:
     this.simpnbtn = ((System.Windows.Controls.Button)(target));
     
     #line 58 "..\..\..\Pasien.xaml"
     this.simpnbtn.Click += new System.Windows.RoutedEventHandler(this.simpnbtn_Click);
     
     #line default
     #line hidden
     return;
     case 29:
     this.batlbtn = ((System.Windows.Controls.Button)(target));
     
     #line 59 "..\..\..\Pasien.xaml"
     this.batlbtn.Click += new System.Windows.RoutedEventHandler(this.batlbtn_Click);
     
     #line default
     #line hidden
     return;
     case 30:
     this.pwdlama = ((System.Windows.Controls.Label)(target));
     return;
     case 31:
     this.pwdbaru = ((System.Windows.Controls.Label)(target));
     return;
     case 32:
     this.pwdlagi = ((System.Windows.Controls.Label)(target));
     return;
     case 33:
     this.passwordLama = ((System.Windows.Controls.PasswordBox)(target));
     return;
     case 34:
     this.passwordBaru = ((System.Windows.Controls.PasswordBox)(target));
     return;
     case 35:
     this.passwordBaru2 = ((System.Windows.Controls.PasswordBox)(target));
     return;
     case 36:
     this.groupBox1 = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 37:
     this.tesreportbtn = ((System.Windows.Controls.Button)(target));
     
     #line 70 "..\..\..\Pasien.xaml"
     this.tesreportbtn.Click += new System.Windows.RoutedEventHandler(this.tesreportbtn_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Example #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.pasien = ((TCHusada.Pasien)(target));
                return;

            case 2:
                this.FormFade = ((System.Windows.Media.Animation.Storyboard)(target));
                return;

            case 3:
                this.FormFadeAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target));
                return;

            case 4:
                this.imgBackground = ((System.Windows.Controls.Image)(target));
                return;

            case 5:
                this.labeljam = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.labellogin = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.image1 = ((System.Windows.Controls.Image)(target));

            #line 32 "..\..\..\Pasien.xaml"
                this.image1.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.image1_MouseDown);

            #line default
            #line hidden
                return;

            case 8:
                this.tblogout = ((System.Windows.Controls.Label)(target));

            #line 33 "..\..\..\Pasien.xaml"
                this.tblogout.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.tblogout_MouseDown);

            #line default
            #line hidden
                return;

            case 9:
                this.labelpengguna = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.tblexit = ((System.Windows.Controls.Label)(target));

            #line 35 "..\..\..\Pasien.xaml"
                this.tblexit.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.tblexit_MouseDown);

            #line default
            #line hidden
                return;

            case 11:
                this.tabControl1 = ((System.Windows.Controls.TabControl)(target));
                return;

            case 12:
                this.tabItemSaya = ((System.Windows.Controls.TabItem)(target));
                return;

            case 13:
                this.groupBoxTT = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 14:
                this.labelniptt = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.labelnamtt = ((System.Windows.Controls.Label)(target));
                return;

            case 16:
                this.labelalatt = ((System.Windows.Controls.Label)(target));
                return;

            case 17:
                this.labelklmtt = ((System.Windows.Controls.Label)(target));
                return;

            case 18:
                this.labeltlptt = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.labeltgltt = ((System.Windows.Controls.Label)(target));
                return;

            case 20:
                this.textBoxniptt = ((System.Windows.Controls.TextBox)(target));
                return;

            case 21:
                this.textBoxnamtt = ((System.Windows.Controls.TextBox)(target));
                return;

            case 22:
                this.textBoxalatt = ((System.Windows.Controls.TextBox)(target));
                return;

            case 23:
                this.textBoxklmtt = ((System.Windows.Controls.TextBox)(target));
                return;

            case 24:
                this.textBoxtlptt = ((System.Windows.Controls.TextBox)(target));
                return;

            case 25:
                this.datemsktt = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 26:
                this.groupgntp = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 27:
                this.gantibtn = ((System.Windows.Controls.Button)(target));

            #line 57 "..\..\..\Pasien.xaml"
                this.gantibtn.Click += new System.Windows.RoutedEventHandler(this.gantibtn_Click);

            #line default
            #line hidden
                return;

            case 28:
                this.simpnbtn = ((System.Windows.Controls.Button)(target));

            #line 58 "..\..\..\Pasien.xaml"
                this.simpnbtn.Click += new System.Windows.RoutedEventHandler(this.simpnbtn_Click);

            #line default
            #line hidden
                return;

            case 29:
                this.batlbtn = ((System.Windows.Controls.Button)(target));

            #line 59 "..\..\..\Pasien.xaml"
                this.batlbtn.Click += new System.Windows.RoutedEventHandler(this.batlbtn_Click);

            #line default
            #line hidden
                return;

            case 30:
                this.pwdlama = ((System.Windows.Controls.Label)(target));
                return;

            case 31:
                this.pwdbaru = ((System.Windows.Controls.Label)(target));
                return;

            case 32:
                this.pwdlagi = ((System.Windows.Controls.Label)(target));
                return;

            case 33:
                this.passwordLama = ((System.Windows.Controls.PasswordBox)(target));
                return;

            case 34:
                this.passwordBaru = ((System.Windows.Controls.PasswordBox)(target));
                return;

            case 35:
                this.passwordBaru2 = ((System.Windows.Controls.PasswordBox)(target));
                return;

            case 36:
                this.groupBox1 = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 37:
                this.tesreportbtn = ((System.Windows.Controls.Button)(target));

            #line 70 "..\..\..\Pasien.xaml"
                this.tesreportbtn.Click += new System.Windows.RoutedEventHandler(this.tesreportbtn_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #4
0
        public void masuk()
        {
            if (!(txtUserName.Text == "" || passwordBox1.Password == ""))
            {
                if (F.checkPass(txtUserName.Text, passwordBox1.Password))
                {
                    if (txtUserName.Text == "admin")
                    {
                        Admin a = new Admin();
                        a.Show();
                        this.Hide();
                    }
                    siapa.anda = txtUserName.Text;
                    string pilih = txtUserName.Text;
                    switch (pilih[1])
                    {
                    case '1':
                        //MessageBox.Show("Dokter");
                        Dokter d = new Dokter();
                        d.Show();
                        this.Hide();
                        break;

                    case '2':
                        //MessageBox.Show("Perawat");
                        Perawat p = new Perawat();
                        p.Show();
                        this.Hide();
                        break;

                    case '3':
                        //MessageBox.Show("Karyawan");
                        Karyawan k = new Karyawan();
                        k.Show();
                        this.Hide();
                        break;

                    case '4':
                        //MessageBox.Show("Pasien");
                        Pasien s = new Pasien();
                        s.Show();
                        this.Hide();
                        break;
                    }
                }
                else if (txtUserName.Text == "su" && passwordBox1.Password == "superuser")
                {
                    Admin a = new Admin();
                    a.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Username dan Password tidak cocok", "Peringatan", MessageBoxButton.OK, MessageBoxImage.Warning);
                }
            }
            else if (txtUserName.Text == "" && !(passwordBox1.Password == ""))
            {
                MessageBox.Show("username kosong");
            }
            else if (passwordBox1.Password == "" && !(txtUserName.Text == ""))
            {
                MessageBox.Show("password kosong");
            }
            else
            {
                MessageBox.Show("username & password kosong");
            }
        }