Exemple #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");
 }
Exemple #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.perawat = ((TCHusada.Perawat)(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 "..\..\..\Perawat.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 "..\..\..\Perawat.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 "..\..\..\Perawat.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.tabItemSayaper = ((System.Windows.Controls.TabItem)(target));
                return;

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

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

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

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

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

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

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

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

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

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

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

            case 24:
                this.ubahbtntt = ((System.Windows.Controls.Button)(target));

            #line 51 "..\..\..\Perawat.xaml"
                this.ubahbtntt.Click += new System.Windows.RoutedEventHandler(this.ubahbtntt_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.simpanbtntt = ((System.Windows.Controls.Button)(target));

            #line 52 "..\..\..\Perawat.xaml"
                this.simpanbtntt.Click += new System.Windows.RoutedEventHandler(this.simpanbtntt_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.bersihbtntt = ((System.Windows.Controls.Button)(target));

            #line 53 "..\..\..\Perawat.xaml"
                this.bersihbtntt.Click += new System.Windows.RoutedEventHandler(this.bersihbtntt_Click);

            #line default
            #line hidden
                return;

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

            #line 54 "..\..\..\Perawat.xaml"
                this.batalbtntt.Click += new System.Windows.RoutedEventHandler(this.batalbtntt_Click);

            #line default
            #line hidden
                return;

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

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

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

            #line default
            #line hidden
                return;

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

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

            #line default
            #line hidden
                return;

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

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

            #line default
            #line hidden
                return;

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

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

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

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

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

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

            case 38:
                this.groupBoxrepot = ((System.Windows.Controls.GroupBox)(target));
                return;

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

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

            #line default
            #line hidden
                return;

            case 40:
                this.tabItemLAB = ((System.Windows.Controls.TabItem)(target));
                return;

            case 41:
                this.groupBoxUGD = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 42:
                this.labelnolab = ((System.Windows.Controls.Label)(target));
                return;

            case 43:
                this.labelnopass = ((System.Windows.Controls.Label)(target));
                return;

            case 44:
                this.labeltangidlab = ((System.Windows.Controls.Label)(target));
                return;

            case 45:
                this.labeltanglab = ((System.Windows.Controls.Label)(target));
                return;

            case 46:
                this.labelbiayaugd = ((System.Windows.Controls.Label)(target));
                return;

            case 47:
                this.textBoxnolab = ((System.Windows.Controls.TextBox)(target));
                return;

            case 48:
                this.textBoxnopass = ((System.Windows.Controls.TextBox)(target));
                return;

            case 49:
                this.datetanglab = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 50:
                this.textBoxtidlab = ((System.Windows.Controls.TextBox)(target));
                return;

            case 51:
                this.textBoxbiayalab = ((System.Windows.Controls.TextBox)(target));
                return;

            case 52:
                this.tambahtranslab = ((System.Windows.Controls.Button)(target));

            #line 91 "..\..\..\Perawat.xaml"
                this.tambahtranslab.Click += new System.Windows.RoutedEventHandler(this.tambahtranslab_Click);

            #line default
            #line hidden
                return;

            case 53:
                this.simpantranslab = ((System.Windows.Controls.Button)(target));

            #line 92 "..\..\..\Perawat.xaml"
                this.simpantranslab.Click += new System.Windows.RoutedEventHandler(this.simpantranslab_Click);

            #line default
            #line hidden
                return;

            case 54:
                this.bersihtranslab = ((System.Windows.Controls.Button)(target));

            #line 93 "..\..\..\Perawat.xaml"
                this.bersihtranslab.Click += new System.Windows.RoutedEventHandler(this.bersihtranslab_Click);

            #line default
            #line hidden
                return;

            case 55:
                this.bataltranslab = ((System.Windows.Controls.Button)(target));

            #line 94 "..\..\..\Perawat.xaml"
                this.bataltranslab.Click += new System.Windows.RoutedEventHandler(this.bataltranslab_Click);

            #line default
            #line hidden
                return;

            case 56:
                this.tabItemLab = ((System.Windows.Controls.TabItem)(target));
                return;

            case 57:
                this.labellabdat = ((System.Windows.Controls.Label)(target));
                return;

            case 58:
                this.spMainper = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 59:
                this.dataGridPer = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 60:
                this.groupBoxlab = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 61:
                this.textnoadmlab = ((System.Windows.Controls.TextBox)(target));
                return;

            case 62:
                this.labelnotranslab = ((System.Windows.Controls.Label)(target));
                return;

            case 63:
                this.caributlab = ((System.Windows.Controls.Button)(target));

            #line 118 "..\..\..\Perawat.xaml"
                this.caributlab.Click += new System.Windows.RoutedEventHandler(this.caributlab_Click);

            #line default
            #line hidden
                return;

            case 64:
                this.kembalibutlab = ((System.Windows.Controls.Button)(target));

            #line 119 "..\..\..\Perawat.xaml"
                this.kembalibutlab.Click += new System.Windows.RoutedEventHandler(this.kembalibutlab_Click);

            #line default
            #line hidden
                return;

            case 65:
                this.tabItemS = ((System.Windows.Controls.TabItem)(target));
                return;

            case 66:
                this.labeltbls = ((System.Windows.Controls.Label)(target));
                return;

            case 67:
                this.spMainS = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 68:
                this.dataGridS = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 69:
                this.groupBoxS = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 70:
                this.textnos = ((System.Windows.Controls.TextBox)(target));
                return;

            case 71:
                this.labelnos = ((System.Windows.Controls.Label)(target));
                return;

            case 72:
                this.caributpass = ((System.Windows.Controls.Button)(target));

            #line 145 "..\..\..\Perawat.xaml"
                this.caributpass.Click += new System.Windows.RoutedEventHandler(this.caributpass_Click);

            #line default
            #line hidden
                return;

            case 73:
                this.kembalibutpass = ((System.Windows.Controls.Button)(target));

            #line 146 "..\..\..\Perawat.xaml"
                this.kembalibutpass.Click += new System.Windows.RoutedEventHandler(this.kembalibutpass_Click);

            #line default
            #line hidden
                return;

            case 74:
                this.tabItemJadwalD = ((System.Windows.Controls.TabItem)(target));
                return;

            case 75:
                this.labeljadwaldok = ((System.Windows.Controls.Label)(target));
                return;

            case 76:
                this.dataGridjadwaldok = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 77:
                this.labeljadwalper = ((System.Windows.Controls.Label)(target));
                return;

            case 78:
                this.dataGridjadwalper = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 79:
                this.jdwlpersya = ((System.Windows.Controls.Button)(target));

            #line 177 "..\..\..\Perawat.xaml"
                this.jdwlpersya.Click += new System.Windows.RoutedEventHandler(this.jdwlpersya_Click);

            #line default
            #line hidden
                return;

            case 80:
                this.jdwlpersmua = ((System.Windows.Controls.Button)(target));

            #line 178 "..\..\..\Perawat.xaml"
                this.jdwlpersmua.Click += new System.Windows.RoutedEventHandler(this.jdwlpersmua_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.perawat = ((TCHusada.Perawat)(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 "..\..\..\Perawat.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 "..\..\..\Perawat.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 "..\..\..\Perawat.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.tabItemSayaper = ((System.Windows.Controls.TabItem)(target));
     return;
     case 13:
     this.groupBoxTT = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 14:
     this.labelnipper = ((System.Windows.Controls.Label)(target));
     return;
     case 15:
     this.labelnamper = ((System.Windows.Controls.Label)(target));
     return;
     case 16:
     this.labelalper = ((System.Windows.Controls.Label)(target));
     return;
     case 17:
     this.labelklmper = ((System.Windows.Controls.Label)(target));
     return;
     case 18:
     this.labeltlper = ((System.Windows.Controls.Label)(target));
     return;
     case 19:
     this.textBoxniptt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 20:
     this.textBoxnamtt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 21:
     this.textBoxalatt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 22:
     this.textBoxklmtt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 23:
     this.textBoxtlptt = ((System.Windows.Controls.TextBox)(target));
     return;
     case 24:
     this.ubahbtntt = ((System.Windows.Controls.Button)(target));
     
     #line 51 "..\..\..\Perawat.xaml"
     this.ubahbtntt.Click += new System.Windows.RoutedEventHandler(this.ubahbtntt_Click);
     
     #line default
     #line hidden
     return;
     case 25:
     this.simpanbtntt = ((System.Windows.Controls.Button)(target));
     
     #line 52 "..\..\..\Perawat.xaml"
     this.simpanbtntt.Click += new System.Windows.RoutedEventHandler(this.simpanbtntt_Click);
     
     #line default
     #line hidden
     return;
     case 26:
     this.bersihbtntt = ((System.Windows.Controls.Button)(target));
     
     #line 53 "..\..\..\Perawat.xaml"
     this.bersihbtntt.Click += new System.Windows.RoutedEventHandler(this.bersihbtntt_Click);
     
     #line default
     #line hidden
     return;
     case 27:
     this.batalbtntt = ((System.Windows.Controls.Button)(target));
     
     #line 54 "..\..\..\Perawat.xaml"
     this.batalbtntt.Click += new System.Windows.RoutedEventHandler(this.batalbtntt_Click);
     
     #line default
     #line hidden
     return;
     case 28:
     this.groupgntp = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 29:
     this.gantibtn = ((System.Windows.Controls.Button)(target));
     
     #line 59 "..\..\..\Perawat.xaml"
     this.gantibtn.Click += new System.Windows.RoutedEventHandler(this.gantibtn_Click);
     
     #line default
     #line hidden
     return;
     case 30:
     this.simpnbtn = ((System.Windows.Controls.Button)(target));
     
     #line 60 "..\..\..\Perawat.xaml"
     this.simpnbtn.Click += new System.Windows.RoutedEventHandler(this.simpnbtn_Click);
     
     #line default
     #line hidden
     return;
     case 31:
     this.batlbtn = ((System.Windows.Controls.Button)(target));
     
     #line 61 "..\..\..\Perawat.xaml"
     this.batlbtn.Click += new System.Windows.RoutedEventHandler(this.batlbtn_Click);
     
     #line default
     #line hidden
     return;
     case 32:
     this.pwdlama = ((System.Windows.Controls.Label)(target));
     return;
     case 33:
     this.pwdbaru = ((System.Windows.Controls.Label)(target));
     return;
     case 34:
     this.pwdlagi = ((System.Windows.Controls.Label)(target));
     return;
     case 35:
     this.passwordLama = ((System.Windows.Controls.PasswordBox)(target));
     return;
     case 36:
     this.passwordBaru = ((System.Windows.Controls.PasswordBox)(target));
     return;
     case 37:
     this.passwordBaru2 = ((System.Windows.Controls.PasswordBox)(target));
     return;
     case 38:
     this.groupBoxrepot = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 39:
     this.tesreportbtn = ((System.Windows.Controls.Button)(target));
     
     #line 72 "..\..\..\Perawat.xaml"
     this.tesreportbtn.Click += new System.Windows.RoutedEventHandler(this.tesreportbtn_Click);
     
     #line default
     #line hidden
     return;
     case 40:
     this.tabItemLAB = ((System.Windows.Controls.TabItem)(target));
     return;
     case 41:
     this.groupBoxUGD = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 42:
     this.labelnolab = ((System.Windows.Controls.Label)(target));
     return;
     case 43:
     this.labelnopass = ((System.Windows.Controls.Label)(target));
     return;
     case 44:
     this.labeltangidlab = ((System.Windows.Controls.Label)(target));
     return;
     case 45:
     this.labeltanglab = ((System.Windows.Controls.Label)(target));
     return;
     case 46:
     this.labelbiayaugd = ((System.Windows.Controls.Label)(target));
     return;
     case 47:
     this.textBoxnolab = ((System.Windows.Controls.TextBox)(target));
     return;
     case 48:
     this.textBoxnopass = ((System.Windows.Controls.TextBox)(target));
     return;
     case 49:
     this.datetanglab = ((System.Windows.Controls.DatePicker)(target));
     return;
     case 50:
     this.textBoxtidlab = ((System.Windows.Controls.TextBox)(target));
     return;
     case 51:
     this.textBoxbiayalab = ((System.Windows.Controls.TextBox)(target));
     return;
     case 52:
     this.tambahtranslab = ((System.Windows.Controls.Button)(target));
     
     #line 91 "..\..\..\Perawat.xaml"
     this.tambahtranslab.Click += new System.Windows.RoutedEventHandler(this.tambahtranslab_Click);
     
     #line default
     #line hidden
     return;
     case 53:
     this.simpantranslab = ((System.Windows.Controls.Button)(target));
     
     #line 92 "..\..\..\Perawat.xaml"
     this.simpantranslab.Click += new System.Windows.RoutedEventHandler(this.simpantranslab_Click);
     
     #line default
     #line hidden
     return;
     case 54:
     this.bersihtranslab = ((System.Windows.Controls.Button)(target));
     
     #line 93 "..\..\..\Perawat.xaml"
     this.bersihtranslab.Click += new System.Windows.RoutedEventHandler(this.bersihtranslab_Click);
     
     #line default
     #line hidden
     return;
     case 55:
     this.bataltranslab = ((System.Windows.Controls.Button)(target));
     
     #line 94 "..\..\..\Perawat.xaml"
     this.bataltranslab.Click += new System.Windows.RoutedEventHandler(this.bataltranslab_Click);
     
     #line default
     #line hidden
     return;
     case 56:
     this.tabItemLab = ((System.Windows.Controls.TabItem)(target));
     return;
     case 57:
     this.labellabdat = ((System.Windows.Controls.Label)(target));
     return;
     case 58:
     this.spMainper = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 59:
     this.dataGridPer = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 60:
     this.groupBoxlab = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 61:
     this.textnoadmlab = ((System.Windows.Controls.TextBox)(target));
     return;
     case 62:
     this.labelnotranslab = ((System.Windows.Controls.Label)(target));
     return;
     case 63:
     this.caributlab = ((System.Windows.Controls.Button)(target));
     
     #line 118 "..\..\..\Perawat.xaml"
     this.caributlab.Click += new System.Windows.RoutedEventHandler(this.caributlab_Click);
     
     #line default
     #line hidden
     return;
     case 64:
     this.kembalibutlab = ((System.Windows.Controls.Button)(target));
     
     #line 119 "..\..\..\Perawat.xaml"
     this.kembalibutlab.Click += new System.Windows.RoutedEventHandler(this.kembalibutlab_Click);
     
     #line default
     #line hidden
     return;
     case 65:
     this.tabItemS = ((System.Windows.Controls.TabItem)(target));
     return;
     case 66:
     this.labeltbls = ((System.Windows.Controls.Label)(target));
     return;
     case 67:
     this.spMainS = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 68:
     this.dataGridS = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 69:
     this.groupBoxS = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 70:
     this.textnos = ((System.Windows.Controls.TextBox)(target));
     return;
     case 71:
     this.labelnos = ((System.Windows.Controls.Label)(target));
     return;
     case 72:
     this.caributpass = ((System.Windows.Controls.Button)(target));
     
     #line 145 "..\..\..\Perawat.xaml"
     this.caributpass.Click += new System.Windows.RoutedEventHandler(this.caributpass_Click);
     
     #line default
     #line hidden
     return;
     case 73:
     this.kembalibutpass = ((System.Windows.Controls.Button)(target));
     
     #line 146 "..\..\..\Perawat.xaml"
     this.kembalibutpass.Click += new System.Windows.RoutedEventHandler(this.kembalibutpass_Click);
     
     #line default
     #line hidden
     return;
     case 74:
     this.tabItemJadwalD = ((System.Windows.Controls.TabItem)(target));
     return;
     case 75:
     this.labeljadwaldok = ((System.Windows.Controls.Label)(target));
     return;
     case 76:
     this.dataGridjadwaldok = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 77:
     this.labeljadwalper = ((System.Windows.Controls.Label)(target));
     return;
     case 78:
     this.dataGridjadwalper = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 79:
     this.jdwlpersya = ((System.Windows.Controls.Button)(target));
     
     #line 177 "..\..\..\Perawat.xaml"
     this.jdwlpersya.Click += new System.Windows.RoutedEventHandler(this.jdwlpersya_Click);
     
     #line default
     #line hidden
     return;
     case 80:
     this.jdwlpersmua = ((System.Windows.Controls.Button)(target));
     
     #line 178 "..\..\..\Perawat.xaml"
     this.jdwlpersmua.Click += new System.Windows.RoutedEventHandler(this.jdwlpersmua_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Exemple #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");
            }
        }