private bool ValidatePiHutang()
        {
            RecreateBalloon();

            balloonHelp.Caption = "Validasi data kurang";
            if (piHutangPicComboBox.SelectedIndex == -1)
            {
                balloonHelp.Content = "Pilih " + piHutangPicLabel.Text + " !!";
                balloonHelp.ShowBalloon(piHutangPicComboBox);
                piHutangPicComboBox.Focus();
                return(false);
            }
            if (subAccountIdComboBox.SelectedIndex == -1)
            {
                balloonHelp.Content = "Pilih kas !!";
                balloonHelp.ShowBalloon(subAccountIdComboBox);
                subAccountIdComboBox.Focus();
                return(false);
            }
            if (journalJumlahNumericUpDown.Value == 0)
            {
                balloonHelp.Content = "Harus ada transaksi yang dibayar !!";
                balloonHelp.ShowBalloon(tPiHutangDataGridView);
                tPiHutangDataGridView.Focus();
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        private bool ValidateJournalDetail()
        {
            RecreateBalloon();

            balloonHelp.Caption = "Validasi data kurang";
            if (string.IsNullOrEmpty(subAccountIdTextBox.Text.Trim()))
            {
                balloonHelp.Content = "Akun yang akan diinput harus diisi !!";
                balloonHelp.ShowBalloon(subAccountIdTextBox);
                subAccountIdTextBox.Focus();
                return(false);
            }

            if (!journalStatusKreditRadioButton.Checked && !journalStatusDebetRadioButton.Checked)
            {
                balloonHelp.Content = "Pilih posisi akun !!";
                balloonHelp.ShowBalloon(journalStatusDebetRadioButton);
                journalStatusDebetRadioButton.Focus();
                return(false);
            }

            if (journalJumlahNumericUpDown.Value == 0)
            {
                balloonHelp.Content = "Jumlah tidak boleh 0 !!";
                balloonHelp.ShowBalloon(journalJumlahNumericUpDown);
                journalJumlahNumericUpDown.Focus();
                return(false);
            }

            return(true);
        }
Beispiel #3
0
        private void combo_Supplier_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (combo_Supplier.SelectedIndex == -1)
            {
                return;
            }

            btn_Detail.Enabled = (combo_Supplier.SelectedIndex != -1);
            lbl_Supplier.Text  = combo_Supplier.Text;

            currencyIdComboBox1.SelectedItem = currencyIdComboBox.SelectedItem;

            try
            {
                BindGiroData();
                CalculateTotalUtang();
            }
            catch (Exception)
            {
            }

            RecreateBalloon();
            balloonHelp.Caption = "Detail Utang";
            balloonHelp.Content = "Klik disini untuk melihat detail utang";
            balloonHelp.ShowBalloon(btn_Detail);
        }
        private bool ValidateForm()
        {
            RecreateBalloon();

            user = (MUser)DataMaster.GetObjectByProperty(typeof(MUser), MUser.ColumnNames.UserName, userNameLabel1.Text, MUser.ColumnNames.UserPassword, userPasswordTextBox.Text);

            if (user == null)
            {
                balloonHelp.Caption = "Login Tidak Valid";
                balloonHelp.Content = "Password anda tidak cocok !!";
                balloonHelp.ShowBalloon(userPasswordTextBox);
                userPasswordTextBox.Focus();
                return(false);
            }
            else if (string.IsNullOrEmpty(userPasswordTextBoxNew.Text))
            {
                balloonHelp.Caption = "Password Baru";
                balloonHelp.Content = "Password baru harus diisi";
                balloonHelp.ShowBalloon(userPasswordTextBoxNew);
                userPasswordTextBoxNew.Focus();
                return(false);
            }
            else if (!userPasswordTextBoxConfirm.Text.Equals(userPasswordTextBoxNew.Text))
            {
                balloonHelp.Caption = "Konfirmasi Password";
                balloonHelp.Content = "Konfirmasi Password berbeda dengan password baru, konfirmasi password harus sama dengan password baru.";
                balloonHelp.ShowBalloon(userPasswordTextBoxConfirm);
                userPasswordTextBoxConfirm.Focus();
                return(false);
            }
            return(true);
        }
Beispiel #5
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            MUser user = (MUser)DataMaster.GetObjectByProperty(typeof(MUser), MUser.ColumnNames.UserName, userNameTextBox.Text, MUser.ColumnNames.UserPassword, userPasswordTextBox.Text);

            if (user != null)
            {
                if (!user.UserStatus)
                {
                    RecreateBalloon();

                    balloonHelp.Caption = "Login Tidak Valid";
                    balloonHelp.Content = "User name anda tidak aktif";
                    balloonHelp.ShowBalloon(userNameTextBox);
                    userNameTextBox.Focus();
                    userNameTextBox.SelectAll();
                    return;
                }

                this.Hide();

                if (f_Main != null)
                {
                    if (!f_Main.IsDisposed)
                    {
                        f_Main.WindowState = FormWindowState.Normal;
                        f_Main.BringToFront();
                        f_Main.loginToolStripMenuItem.Enabled = false;
                    }
                    else
                    {
                        f_Main = new FormMain();
                    }
                }
                else
                {
                    f_Main = new FormMain();
                }

                f_Main.toolStripStatusLabelLoginName.Text = userNameTextBox.Text;
                f_Main.FilterPriviledge();
                f_Main.Show();
            }
            else
            {
                RecreateBalloon();

                balloonHelp.Caption = "Login Tidak Valid";
                balloonHelp.Content = "User Name atau password tidak cocok !!";
                balloonHelp.ShowBalloon(userNameTextBox);
                userNameTextBox.Focus();
                userNameTextBox.SelectAll();
            }
        }
 private void showBalloon(string title, string content, Point displayPoint)
 {
     balloonHelp         = new Balloon.NET.BalloonHelp();
     balloonHelp.Caption = title;
     balloonHelp.Content = content;
     balloonHelp.Icon    = SystemIcons.Warning;
     balloonHelp.ShowBalloon(dgvDetail);
     balloonHelp.AnchorPoint = displayPoint;
 }
        private bool ValidateForm()
        {
            RecreateBalloon();

            balloonHelp.Caption = "Validasi data kurang";
            if (discDayComboBox.SelectedIndex == -1)
            {
                balloonHelp.Content = "Pilih hari";
                balloonHelp.ShowBalloon(discDayComboBox);
                discDayComboBox.Focus();
                return(false);
            }
            else if (string.IsNullOrEmpty(discTextBox.Text))
            {
                balloonHelp.Content = "Diskon harus diisi";
                balloonHelp.ShowBalloon(discTextBox);
                discTextBox.Focus();
                return(false);
            }
            return(true);
        }
Beispiel #8
0
        private bool ValidateTransaction()
        {
            RecreateBalloon();

            balloonHelp.Caption = "Validasi data kurang";
            if (string.IsNullOrEmpty(transactionFacturTextBox.Text.Trim()))
            {
                balloonHelp.Content = "Nomor faktur harus diisi !!";
                balloonHelp.ShowBalloon(transactionFacturTextBox);
                transactionFacturTextBox.Focus();
                return(false);
            }

            if (serviceTypeComboBox.SelectedIndex == -1)
            {
                balloonHelp.Content = "Pilih jenis service !!";
                balloonHelp.ShowBalloon(serviceTypeComboBox);
                serviceTypeComboBox.Focus();
                return(false);
            }

            if (!string.IsNullOrEmpty(transactionFacturTextBox.Text.Trim()))
            {
                TTransaction tr = (TTransaction)DataMaster.GetObjectByProperty(typeof(TTransaction), TTransaction.ColumnNames.TransactionFactur, transactionFacturTextBox.Text.Trim(), TTransaction.ColumnNames.TransactionStatus, ListOfTransaction.Sales.ToString());
                if (tr != null)
                {
                    balloonHelp.Content = "Nomor faktur " + transactionFacturTextBox.Text + " sudah pernah diinput, silahkan input nomor faktur yang lain.";
                    balloonHelp.ShowBalloon(transactionFacturTextBox);
                    transactionFacturTextBox.Focus();
                    return(false);
                }
            }

            return(true);
        }
Beispiel #9
0
        private void transactionReferenceFacturTextBox_Validating(object sender, CancelEventArgs e)
        {
            TTransaction tr = (TTransaction)DataMaster.GetObjectByProperty(typeof(TTransaction), TTransaction.ColumnNames.TransactionFactur, transactionReferenceFacturTextBox.Text);

            if (tr != null)
            {
                transactionReferenceIdTextBox.Text = tr.TransactionId.ToString();
                FillTransaction(tr);
                FillTransactionDetail(tr);
                button_Detail.Visible = true;

                RecreateBalloon();
                balloonHelp.Caption = "Detail Transaksi";
                balloonHelp.Content = "Klik disini untuk melihat detail transaksi";
                balloonHelp.ShowBalloon(button_Detail);
            }
            else
            {
                transactionReferenceIdTextBox.ResetText();
                button_Detail.Visible = false;
                //tTransactionDeliveryDetailDataGridView.DataSource = null;
            }
        }
        /// <summary>
        /// Mostra mensagem.
        /// </summary>
        private static void MostrarMensagem(TextBoxBase txt, string título, string mensagem)
        {
            Balloon.NET.BalloonHelp balão = new Balloon.NET.BalloonHelp();
            balão.Caption = título;
            balão.Icon = SystemIcons.Exclamation;
            balão.CloseOnDeactivate = false;
            balão.CloseOnKeyPress = false;
            balão.Content = mensagem;

            try
            {
                balão.ShowBalloon(txt);
                txt.Focus();
            }
            catch
            { }
        }
Beispiel #11
0
        private void SetFormToCorrection()
        {
            splitContainer2.SplitterDistance = splitContainer2.SplitterDistance - 220;

            detailControl_KeyDown(txt_CustId, new KeyEventArgs(Keys.Enter));
            num_Quantity.Minimum  = -99999999;
            lbl_Price.Visible     = false;
            num_Price.Visible     = false;
            txt_SubPrice.Visible  = false;
            lbl_Jumlah.Visible    = false;
            num_Jumlah.Visible    = false;
            txt_SubJumlah.Visible = false;
            lbl_Disc.Visible      = false;
            num_Disc.Visible      = false;
            txt_SubDisc.Visible   = false;
            lbl_Total.Visible     = false;
            num_Total.Visible     = false;
            txt_SubTotal.Visible  = false;
            grid_Trans.Width      = grid_Trans.Width - 320;
            //groupBox6.Width = 221;

            groupBox6.Visible  = false;
            groupBox7.Visible  = false;
            groupBox3.Location = new Point(8, groupBox3.Location.Y);
            button1.Location   = new Point(button1.Location.X - 320, button1.Location.Y);
            button2.Location   = new Point(button2.Location.X - 320, button2.Location.Y);
            button3.Location   = new Point(button3.Location.X - 320, button3.Location.Y);

            groupBox5.Size = new Size(groupBox5.Size.Width - 300, groupBox5.Size.Height);
            groupBox2.Size = new Size(groupBox2.Size.Width - 300, groupBox2.Size.Height);
            groupBox4.Size = new Size(groupBox4.Size.Width - 300, groupBox4.Size.Height);
            groupBox9.Size = new Size(groupBox9.Size.Width - 320, groupBox9.Size.Height);
            this.Width     = this.Width - 300;
            this.Height    = this.Height - 70;

            lbl_ShopName.Location    = new Point(lbl_ShopName.Location.X - 150, lbl_ShopName.Location.Y);
            lbl_ShopAddress.Location = new Point(lbl_ShopAddress.Location.X - 150, lbl_ShopAddress.Location.Y);
            lbl_ShopTelp.Location    = new Point(lbl_ShopTelp.Location.X - 150, lbl_ShopTelp.Location.Y);

            //display balon petunjuk
            RecreateBalloon();
            balloonHelp.Caption = "Petunjuk Pengisian Data Kuantitas Item";
            balloonHelp.Content = "Jika jumlah item \"kurang\", maka kuantitas item diisi dengan tanda minus (misalnya : \"-8\" ) \n dan apabila jumlah item \"berlebih\", maka kuantitas item diisi tanpa tanda (misalnya : \"9\" )";
            balloonHelp.ShowBalloon(num_Quantity);
        }
Beispiel #12
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            DataMasterMgtServices DataMaster = new DataMasterMgtServices();
            MUser user;

            try
            {
                user = (MUser)DataMaster.GetObjectByProperty(typeof(MUser), MUser.ColumnNames.UserName, userNameTextBox.Text, MUser.ColumnNames.UserPassword, userPasswordTextBox.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Login gagal \n" + ex.Message, "Login Gagal", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (user != null)
            {
                if (!user.UserStatus)
                {
                    RecreateBalloon();

                    balloonHelp.Caption = "Nama pengguna Tidak Valid";
                    balloonHelp.Content = "Nama pengguna tidak aktif";
                    balloonHelp.ShowBalloon(userNameTextBox);
                    userNameTextBox.Focus();
                    userNameTextBox.SelectAll();
                    return;
                }

                this.Hide();

                if (f_Main != null)
                {
                    if (!f_Main.IsDisposed)
                    {
                        f_Main.WindowState = FormWindowState.Normal;
                        f_Main.BringToFront();
                        f_Main.masukToolStripMenuItem.Enabled = false;
                    }
                    else
                    {
                        f_Main = new FormMain();
                    }
                }
                else
                {
                    f_Main = new FormMain();
                }

                f_Main.toolStripStatusLabelLoginName.Text = userNameTextBox.Text;
                //f_Main.FilterPriviledge();
                f_Main.Show();
                Inventori.Module.ModuleControlSettings.SaveLog(ListOfAction.Login, string.Empty, ListOfTable.None, userNameTextBox.Text);
            }
            else
            {
                RecreateBalloon();

                balloonHelp.Caption = "Login Tidak Valid";
                balloonHelp.Content = "Nama pengguna atau kata kunci tidak cocok !!";
                balloonHelp.ShowBalloon(userNameTextBox);
                userNameTextBox.Focus();
                userNameTextBox.SelectAll();
            }
        }
Beispiel #13
0
        bool ValidateTransaction()
        {
            RecreateBalloon();

            balloonHelp.Caption = "Validasi data kurang";
            if (string.IsNullOrEmpty(transactionFacturTextBox.Text.Trim()))
            {
                balloonHelp.Content = "Nomor faktur harus diisi !!";
                balloonHelp.ShowBalloon(transactionFacturTextBox);
                transactionFacturTextBox.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(transactionByTextBox.Text))
            {
                string errMsg = "";
                if ((trans == ListOfTransaction.Sales) || (trans == ListOfTransaction.ReturSales))
                {
                    errMsg = "Pelanggan harus diisi !!";
                }
                else if ((trans == ListOfTransaction.Purchase) || (trans == ListOfTransaction.ReturPurchase))
                {
                    errMsg = "Supplier harus diisi !!";
                }
                else if ((trans == ListOfTransaction.Correction))
                {
                    errMsg = "Pelapor harus diisi !!";
                }

                balloonHelp.Content = errMsg;
                balloonHelp.ShowBalloon(transactionByTextBox);
                transactionByTextBox.Focus();
                return(false);
            }
            if (transactionByNameComboBox.Visible)
            {
                if (transactionByNameComboBox.SelectedIndex == -1)
                {
                    balloonHelp.Content = "Nomor faktur harus diisi !!";
                    balloonHelp.ShowBalloon(transactionByNameComboBox);
                    transactionByNameComboBox.Focus();
                    return(false);
                }
            }
            if (tTransactionDetailDataGridView.RowCount == 0)
            {
                MessageBox.Show("Transaksi yang kosong tidak bisa diproses.", "Transaksi tidak bisa diproses.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                itemIdTextBox.Select();
                itemIdTextBox.Focus();
                return(false);
            }

            if (!string.IsNullOrEmpty(transactionFacturTextBox.Text.Trim()))
            {
                TTransaction tr = (TTransaction)DataMaster.GetObjectByProperty(typeof(TTransaction), TTransaction.ColumnNames.TransactionFactur, transactionFacturTextBox.Text.Trim());
                if (tr != null)
                {
                    balloonHelp.Content = "Nomor faktur " + transactionFacturTextBox.Text + " sudah pernah diinput, silahkan input nomor faktur yang lain.";
                    balloonHelp.ShowBalloon(transactionFacturTextBox);
                    transactionFacturTextBox.Focus();
                    return(false);
                }
            }

            return(true);
        }