Esempio n. 1
0
        private void SetInitialSettings()
        {
            //id
            ModuleControlSettings.SetNumericUpDown(transactionIdNumericUpDown);
            transactionIdNumericUpDown.Value = DateTime.Now.ToFileTime();
            //factur
            transactionFacturTextBox.Text = AppCode.GenerateFacturNo(trans, string.Empty);
            //set date time picker
            ModuleControlSettings.SetDateTimePicker(transactionDateDateTimePicker, false);
            //set numeric up down
            ModuleControlSettings.SetNumericUpDown(quantityNumericUpDown, true);
            //grid view
            ModuleControlSettings.SetGridDataView(tStockDataGridView);
            ModuleControlSettings.SetGridDataView(tTransactionDetailDataGridView);


            //search item
            PictureBox searchPic = new PictureBox();

            ModuleControlSettings.SetSearchPictureBox(itemIdTextBox, ListOfSearchWindow.SearchItem.ToString(), searchPic);
            searchPic.Click += new EventHandler(searchPicItem_Click);
            itemIdTextBox.Controls.Add(searchPic);

            //search supplier
            searchPic = new PictureBox();
            ModuleControlSettings.SetSearchPictureBox(transactionByTextBox, ListOfSearchWindow.SearchCustomer.ToString(), searchPic);
            searchPic.Click += new EventHandler(searchPicTransactionBy_Click);
            transactionByTextBox.Controls.Add(searchPic);


            //title
            string title   = string.Empty;
            string transBy = string.Empty;

            if (trans == ListOfTransaction.Sales)
            {
                transBy = "Pelanggan : ";
                title   = "Barang Keluar";
            }
            else if (trans == ListOfTransaction.Purchase)
            {
                transBy = "Supplier : ";
                title   = "Barang Masuk";
            }
            else if (trans == ListOfTransaction.Correction)
            {
                transBy = "Pemeriksa : ";
                title   = "Koreksi Stok";

                groupBox4.Visible             = false;
                tStockDataGridView.Visible    = false;
                quantityNumericUpDown.Enabled = true;
                quantityNumericUpDown.Minimum = decimal.MinValue;
                groupBox2.Visible             = false;
            }

            this.TabText            = title;
            Text                    = title;
            transactionByLabel.Text = transBy;
        }
Esempio n. 2
0
 private void FormListUserForBilliard_Load(object sender, EventArgs e)
 {
     grid_Master.DataSource = bindingSource_Master;
     bindingSource_Master.Clear();
     ModuleControlSettings.SetGridDataView(grid_MenuAccess);
     grid_MenuAccess.ReadOnly = false;
     BindData();
 }
Esempio n. 3
0
 private void FormListUser_Load(object sender, EventArgs e)
 {
     ModuleControlSettings.SaveLog(ListOfAction.Open, string.Empty, ListOfTable.MUser, lbl_UserName.Text);
     grid_Master.DataSource = bindingSource_Master;
     bindingSource_Master.Clear();
     ModuleControlSettings.SetGridDataView(grid_MenuAccess);
     grid_MenuAccess.ReadOnly = false;
     BindData();
 }
Esempio n. 4
0
        private void CreateColumn()
        {
            grid_Search.Columns.Clear();

            DataGridViewColumn grid_Col;

            //add kolom kode
            grid_Col = new DataGridViewColumn();
            grid_Col.CellTemplate     = new DataGridViewTextBoxCell();
            grid_Col.DataPropertyName = MItem.ColumnNames.ItemId;
            grid_Col.HeaderText       = itemId_HeaderText;
            grid_Search.Columns.Add(grid_Col);
            //add kolom nama
            grid_Col = new DataGridViewColumn();
            grid_Col.CellTemplate     = new DataGridViewTextBoxCell();
            grid_Col.DataPropertyName = MItem.ColumnNames.ItemName;
            grid_Col.HeaderText       = itemName_HeaderText;
            grid_Search.Columns.Add(grid_Col);
            //add kolom harga jual
            grid_Col = new DataGridViewColumn();
            grid_Col.CellTemplate            = new DataGridViewTextBoxCell();
            grid_Col.DataPropertyName        = MItem.ColumnNames.ItemPriceMax;
            grid_Col.HeaderText              = itemSalesPrice_HeaderText;
            grid_Col.DefaultCellStyle.Format = "N";
            grid_Search.Columns.Add(grid_Col);
            //add kolom Harga Jual VIP
            grid_Col = new DataGridViewColumn();
            grid_Col.CellTemplate            = new DataGridViewTextBoxCell();
            grid_Col.DataPropertyName        = MItem.ColumnNames.ItemPriceMaxVip;
            grid_Col.HeaderText              = itemSalesPriceVIP_HeaderText;
            grid_Col.DefaultCellStyle.Format = "N";
            grid_Search.Columns.Add(grid_Col);
            //add kolom Harga Per Satuan
            grid_Col = new DataGridViewColumn();
            grid_Col.CellTemplate            = new DataGridViewTextBoxCell();
            grid_Col.DataPropertyName        = MItem.ColumnNames.ItemPricePurchase;
            grid_Col.HeaderText              = itemPurchasePrice_HeaderText;
            grid_Col.DefaultCellStyle.Format = "N";
            grid_Search.Columns.Add(grid_Col);

            ModuleControlSettings.SetGridDataView(grid_Search);
        }
Esempio n. 5
0
        private void SetInitialSettings()
        {
            grid_Search.Columns.Clear();

            DataGridViewColumn grid_Col;

            //add kolom kode
            grid_Col = new DataGridViewColumn();
            grid_Col.CellTemplate     = new DataGridViewTextBoxCell();
            grid_Col.DataPropertyName = MPacket.ColumnNames.PacketId;
            grid_Col.HeaderText       = string.IsNullOrEmpty(packetIdColoumnName) ? "Kode" : packetIdColoumnName;
            grid_Search.Columns.Add(grid_Col);

            //add kolom nama
            grid_Col = new DataGridViewColumn();
            grid_Col.CellTemplate     = new DataGridViewTextBoxCell();
            grid_Col.DataPropertyName = MPacket.ColumnNames.PacketName;
            grid_Col.HeaderText       = string.IsNullOrEmpty(packetNameColoumnName) ? "Nama" : packetNameColoumnName;
            grid_Search.Columns.Add(grid_Col);

            //add kolom harga
            grid_Col = new DataGridViewColumn();
            grid_Col.CellTemplate               = new DataGridViewTextBoxCell();
            grid_Col.DataPropertyName           = MPacket.ColumnNames.PacketPrice;
            grid_Col.DefaultCellStyle.Format    = "N";
            grid_Col.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            grid_Col.HeaderText = string.IsNullOrEmpty(packetPriceColoumnName) ? "Harga" : packetPriceColoumnName;
            grid_Search.Columns.Add(grid_Col);

            grid_Search.CellDoubleClick  += new DataGridViewCellEventHandler(grid_Search_CellDoubleClick);
            grid_Search.KeyDown          += new KeyEventHandler(grid_Search_KeyDown);
            txt_SearchById.TextChanged   += new EventHandler(txt_SearchById_TextChanged);
            txt_SearchByName.TextChanged += new EventHandler(txt_SearchByName_TextChanged);
            btn_OK.Click += new EventHandler(btn_OK_Click);

            ModuleControlSettings.SetGridDataView(grid_Search);
            //set display text
            groupBox1.Text = this.Text;
        }
Esempio n. 6
0
        private void FormGiro_Load(object sender, EventArgs e)
        {
            ModuleControlSettings.SaveLog(ListOfAction.Open, string.Empty, ListOfTable.TGiro, lbl_UserName.Text);
            UpdateGiroMaturity();
            FillSupplierBindingSource();
            FillBankBindingSource();
            ModuleControlSettings.SetNumericUpDown(num_TotUtang, true);
            ModuleControlSettings.SetNumericUpDown(giroAmmountNumericUpDown);
            ModuleControlSettings.SetNumericUpDown(giroIdNumericUpDown);
            ModuleControlSettings.SetGridDataView(tGiroDataGridView);
            ModuleControlSettings.SetDateTimePicker(giroCairDateDateTimePicker, false);
            ModuleControlSettings.SetDateTimePicker(giroMaturityDateDateTimePicker, false);
            ModuleControlSettings.SetDateTimePicker(giroOutDateDateTimePicker, false);
            ModuleControlSettings.SetDateTimePicker(modifiedDateDateTimePicker, true);
            AppCode.SetGiroStatusComboBox(giroStatusComboBox);
            AppCode.SetCurrencyStatusComboBox(currencyIdComboBox);
            AppCode.SetCurrencyStatusComboBox(currencyIdComboBox1);

            currencyIdComboBox.SelectedIndex = 0;

            num_TotUtang.Minimum = decimal.MinValue;

            combo_Supplier_SelectedIndexChanged(null, null);
        }
Esempio n. 7
0
 private void FormBilliardListUser_Load(object sender, EventArgs e)
 {
     ModuleControlSettings.SetGridDataView(grid_MenuAccess);
     grid_MenuAccess.ReadOnly = false;
     BindData();
 }