private void FillMaster(Type type) { bs = new BindingSource(); bs.DataSource = DataMaster.GetAll(type); reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Inventori_Data_" + type.Name, bs)); }
void SetInitialPiutangSettings() { //title string title = string.Empty; if (IsDelete) { title = "Penghapusan Piutang Dagang"; } else { title = "Penerimaan Piutang Dagang"; } this.Text = title; this.TabText = title; //customer piHutangPicLabel.Text = "Pelanggan "; piHutangPicComboBox.DataSource = DataMaster.GetAll(typeof(MCustomer)); piHutangPicComboBox.DisplayMember = MCustomer.ColumnNames.CustomerName; piHutangPicComboBox.ValueMember = MCustomer.ColumnNames.CustomerId; piHutangPicComboBox.Show(); }
public static DateTime GetMaksDateTransactionClosing() { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listRekap = DataMaster.GetAll(typeof(TRekapTransaction)); TRekapTransaction rekap; DateTime maks = DateTime.MinValue; //search maks rekapdateto for (int i = 0; i < listRekap.Count; i++) { rekap = (TRekapTransaction)listRekap[i]; if (rekap.RekapDateTo > maks) { maks = rekap.RekapDateTo; } } if (maks == DateTime.MinValue) { //search min transaction date maks = DateTime.MaxValue; IList listTrans = DataMaster.GetAll(typeof(TTransaction)); TTransaction trans; for (int i = 0; i < listTrans.Count; i++) { trans = (TTransaction)listTrans[i]; if (maks > trans.TransactionDate) { maks = trans.TransactionDate; } } } return(maks); }
private void FillMItemDataSource() { bs = new BindingSource(); bs.Clear(); bs.DataSource = DataMaster.GetAll(typeof(MItem)); reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Inventori_Data_MItem", bs)); }
private void BindData() { IList listMaster = DataMaster.GetAll(typeof(MItem)); if (listMaster.Count > 0) { bindingSource_Master.DataSource = listMaster; } bindingSource_Master_PositionChanged(null, null); detailControl_KeyDown(null, null); }
void SetInitialPiutangSettings() { //title this.Text = "Penerimaan Piutang Dagang"; this.TabText = "Penerimaan Piutang Dagang"; //customer piHutangPicLabel.Text = "Pelanggan "; piHutangPicComboBox.DataSource = DataMaster.GetAll(typeof(MCustomer)); piHutangPicComboBox.DisplayMember = MCustomer.ColumnNames.CustomerName; piHutangPicComboBox.ValueMember = MCustomer.ColumnNames.CustomerId; piHutangPicComboBox.Show(); }
public static void SetItemComboBoxForFilter(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listItem = DataMaster.GetAll(typeof(MItem)); MItem item; DataTable dt = new DataTable(); dt.Columns.Add(MItem.ColumnNames.ItemId); dt.Columns.Add(MItem.ColumnNames.ItemName); DataRow dr = dt.NewRow(); dr[0] = ""; dr[1] = "-Semua Item-"; dt.Rows.Add(dr); for (int i = 0; i < listItem.Count; i++) { item = (MItem)listItem[i]; dr = dt.NewRow(); dr[0] = item.ItemId; dr[1] = item.ItemName; dt.Rows.Add(dr); } cb.DropDownStyle = ComboBoxStyle.DropDownList; cb.DataSource = dt; cb.ValueMember = MItem.ColumnNames.ItemId; cb.DisplayMember = MItem.ColumnNames.ItemName; cb.Show(); }
public static void SetEkspeditionComboBoxForFilter(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listEks = DataMaster.GetAll(typeof(MEkspedission)); MEkspedission eks; DataTable dt = new DataTable(); dt.Columns.Add(MEkspedission.ColumnNames.EkspedissionId); dt.Columns.Add(MEkspedission.ColumnNames.EkspedissionName); DataRow dr = dt.NewRow(); dr[0] = ""; dr[1] = "-Semua Ekspedisi-"; dt.Rows.Add(dr); for (int i = 0; i < listEks.Count; i++) { eks = (MEkspedission)listEks[i]; dr = dt.NewRow(); dr[0] = eks.EkspedissionId; dr[1] = eks.EkspedissionName; dt.Rows.Add(dr); } cb.DropDownStyle = ComboBoxStyle.DropDownList; cb.DataSource = dt; cb.ValueMember = MEkspedission.ColumnNames.EkspedissionId; cb.DisplayMember = MEkspedission.ColumnNames.EkspedissionName; cb.Show(); }
private void BindData() { bindingSource_Master.DataSource = DataMaster.GetAll(typeof(MUser)); bindingSource_Master_PositionChanged(null, null); detailControl_KeyDown(null, null); }
public static void SetEmployeeComboBoxForFilter(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listEmp = DataMaster.GetAll(typeof(MEmployee)); MEmployee emp; DataTable dt = new DataTable(); dt.Columns.Add(MEmployee.ColumnNames.EmployeeId); dt.Columns.Add(MEmployee.ColumnNames.EmployeeName); DataRow dr = dt.NewRow(); dr[0] = ""; dr[1] = "-Semua Karyawan-"; dt.Rows.Add(dr); for (int i = 0; i < listEmp.Count; i++) { emp = (MEmployee)listEmp[i]; dr = dt.NewRow(); dr[0] = emp.EmployeeId; dr[1] = emp.EmployeeName; dt.Rows.Add(dr); } cb.DropDownStyle = ComboBoxStyle.DropDownList; cb.DataSource = dt; cb.ValueMember = MEmployee.ColumnNames.EmployeeId; cb.DisplayMember = MEmployee.ColumnNames.EmployeeName; cb.Show(); }
private void FillVSisaStockDataSource() { IList listItem = DataMaster.GetAll(typeof(MItem)); IList listVS = new List <VTStockDetail>(); MItem item; VTStockDetail vs; for (int i = 0; i < listItem.Count; i++) { item = listItem[i] as MItem; vs = new VTStockDetail(); vs.ItemId = item.ItemId; vs.ItemName = item.ItemName; //calculate stok akhir vs.GudangId = CalculateStockAkhir(item.ItemId); //calculate stok masuk vs.StockPriceIn = CalculateStock(true, item.ItemId); //calculate stok masuk vs.StockPriceOut = CalculateStock(false, item.ItemId); listVS.Add(vs); } bs = new BindingSource(); bs.DataSource = listVS; reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Inventori_Data_VTStockDetail", bs)); }
public static void SetUserComboBoxForFilter(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listUser = DataMaster.GetAll(typeof(MUser)); MUser user; DataTable dt = new DataTable(); dt.Columns.Add(MUser.ColumnNames.UserStatus); dt.Columns.Add(MUser.ColumnNames.UserName); DataRow dr = dt.NewRow(); dr[0] = ""; dr[1] = "-Semua Pengguna-"; dt.Rows.Add(dr); for (int i = 0; i < listUser.Count; i++) { user = (MUser)listUser[i]; dr = dt.NewRow(); dr[0] = user.UserName; dr[1] = user.UserName; dt.Rows.Add(dr); } cb.DropDownStyle = ComboBoxStyle.DropDownList; cb.DataSource = dt; cb.ValueMember = MUser.ColumnNames.UserStatus; cb.DisplayMember = MUser.ColumnNames.UserName; cb.Show(); }
public static void SetCustomerComboBoxForFilter(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listCust = DataMaster.GetAll(typeof(MCustomer)); MCustomer cust; DataTable dt = new DataTable(); dt.Columns.Add(MCustomer.ColumnNames.CustomerId); dt.Columns.Add(MCustomer.ColumnNames.CustomerName); DataRow dr = dt.NewRow(); dr[0] = ""; dr[1] = "-Semua Pelanggan-"; dt.Rows.Add(dr); for (int i = 0; i < listCust.Count; i++) { cust = (MCustomer)listCust[i]; dr = dt.NewRow(); dr[0] = cust.CustomerId; dr[1] = cust.CustomerName; dt.Rows.Add(dr); } cb.DropDownStyle = ComboBoxStyle.DropDownList; cb.DataSource = dt; cb.ValueMember = MCustomer.ColumnNames.CustomerId; cb.DisplayMember = MCustomer.ColumnNames.CustomerName; cb.Show(); }
public static void SetSupplierComboBoxForFilter(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listSupp = DataMaster.GetAll(typeof(MSupplier)); MSupplier supp; DataTable dt = new DataTable(); dt.Columns.Add(MSupplier.ColumnNames.SupplierId); dt.Columns.Add(MSupplier.ColumnNames.SupplierName); DataRow dr = dt.NewRow(); dr[0] = ""; dr[1] = "-Semua Supplier-"; dt.Rows.Add(dr); for (int i = 0; i < listSupp.Count; i++) { supp = (MSupplier)listSupp[i]; dr = dt.NewRow(); dr[0] = supp.SupplierId; dr[1] = supp.SupplierName; dt.Rows.Add(dr); } cb.DropDownStyle = ComboBoxStyle.DropDownList; cb.DataSource = dt; cb.ValueMember = MSupplier.ColumnNames.SupplierId; cb.DisplayMember = MSupplier.ColumnNames.SupplierName; cb.Show(); }
public static void SetGroupComboBoxForFilter(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listGroup = DataMaster.GetAll(typeof(MGroup)); MGroup group; DataTable dt = new DataTable(); dt.Columns.Add(MGroup.ColumnNames.GroupId); dt.Columns.Add(MGroup.ColumnNames.GroupName); DataRow dr = dt.NewRow(); dr[0] = 0; dr[1] = "-Semua Golongan-"; dt.Rows.Add(dr); for (int i = 0; i < listGroup.Count; i++) { group = (MGroup)listGroup[i]; dr = dt.NewRow(); dr[0] = group.GroupId; dr[1] = group.GroupName; dt.Rows.Add(dr); } cb.DropDownStyle = ComboBoxStyle.DropDownList; cb.DataSource = dt; cb.ValueMember = MGroup.ColumnNames.GroupId; cb.DisplayMember = MGroup.ColumnNames.GroupName; cb.Show(); }
public static void SetGudangComboBox(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listGudang = DataMaster.GetAll(typeof(MGudang)); cb.DropDownStyle = ComboBoxStyle.DropDownList; cb.DataSource = listGudang; cb.ValueMember = MGudang.ColumnNames.GudangId; cb.DisplayMember = MGudang.ColumnNames.GudangName; cb.Show(); }
public static void SetGroupComboBox(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listGroup = DataMaster.GetAll(typeof(MGroup)); cb.DropDownStyle = ComboBoxStyle.DropDownList; if (listGroup.Count > 0) { cb.DataSource = listGroup; cb.DisplayMember = "GroupName"; cb.ValueMember = "GroupId"; cb.Show(); } }
private void SetInitialHutangJasaSettings() { //title string title = string.Empty; if (IsDelete) { title = "Penghapusan Hutang Ekspedisi"; } else { title = "Pembayaran Hutang Ekspedisi"; } this.Text = title; this.TabText = title; //Ekspedisi piHutangPicLabel.Text = "Ekspedisi "; piHutangPicComboBox.DataSource = DataMaster.GetAll(typeof(MEkspedission)); piHutangPicComboBox.DisplayMember = MEkspedission.ColumnNames.EkspedissionName; piHutangPicComboBox.ValueMember = MEkspedission.ColumnNames.EkspedissionId; piHutangPicComboBox.Show(); }
public static void SetCustomerTextBoxSuggest(TextBox txt) { txt.AutoCompleteMode = AutoCompleteMode.SuggestAppend; txt.AutoCompleteSource = AutoCompleteSource.CustomSource; txt.AutoCompleteCustomSource.Clear(); DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listCust = DataMaster.GetAll(typeof(MCustomer)); MCustomer cust; for (int i = 0; i < listCust.Count; i++) { cust = (MCustomer)listCust[i]; txt.AutoCompleteCustomSource.Add(cust.CustomerId); } }
public static void SetSupplierTextBoxSuggest(TextBox txt) { txt.AutoCompleteMode = AutoCompleteMode.SuggestAppend; txt.AutoCompleteSource = AutoCompleteSource.CustomSource; txt.AutoCompleteCustomSource.Clear(); DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listSupp = DataMaster.GetAll(typeof(MSupplier)); MSupplier supp; for (int i = 0; i < listSupp.Count; i++) { supp = (MSupplier)listSupp[i]; txt.AutoCompleteCustomSource.Add(supp.SupplierId); } }
public static void SetEmployeeTextBoxSuggest(TextBox txt) { txt.AutoCompleteMode = AutoCompleteMode.SuggestAppend; txt.AutoCompleteSource = AutoCompleteSource.CustomSource; txt.AutoCompleteCustomSource.Clear(); DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listEmployee = DataMaster.GetAll(typeof(MEmployee)); MEmployee emp; for (int i = 0; i < listEmployee.Count; i++) { emp = (MEmployee)listEmployee[i]; txt.AutoCompleteCustomSource.Add(emp.EmployeeId); } }
public static void SetItemTextBoxSuggest(TextBox txt) { txt.AutoCompleteMode = AutoCompleteMode.SuggestAppend; txt.AutoCompleteSource = AutoCompleteSource.CustomSource; txt.AutoCompleteCustomSource.Clear(); DataMasterMgtServices DataMaster = new DataMasterMgtServices(); IList listItem = DataMaster.GetAll(typeof(MItem)); MItem item; for (int i = 0; i < listItem.Count; i++) { item = (MItem)listItem[i]; txt.AutoCompleteCustomSource.Add(item.ItemId); } }
public static void SetTypeItemComboBox(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); cb.DropDownStyle = ComboBoxStyle.DropDownList; IList listItemType = DataMaster.GetAll(typeof(MItemType)); if (listItemType.Count > 0) { cb.DataSource = listItemType; cb.DisplayMember = "ItemTypeName"; cb.ValueMember = "ItemTypeId"; cb.Show(); } }
public static void SetDepartmentComboBox(ComboBox cb) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); cb.DropDownStyle = ComboBoxStyle.DropDownList; IList listDepartment = DataMaster.GetAll(typeof(MDep)); if (listDepartment.Count > 0) { cb.DataSource = listDepartment; cb.DisplayMember = "DepName"; cb.ValueMember = "DepId"; cb.Show(); } }
private void CreateQueueList() { groupBox_TransHeader.Enabled = false; splitContainer_Detail_Detail.Enabled = false; groupBox_QueueList.Controls.Clear(); IList listQueue = DataMaster.GetAll(typeof(TDesk)); TDesk desk; Button btn; int max = 0; for (int i = 0; i < listQueue.Count; i++) { desk = (TDesk)listQueue[i]; btn = new Button(); btn.UseVisualStyleBackColor = true; btn.Text = desk.DeskId; btn.Tag = desk.DeskTransactionId; btn.Size = new Size(btnWidth, btnHeight); btn.Location = new Point(btnX, btnY); btnX += btnWidth + 5; if ((btnX + btnWidth) > splitContainer_Header.Panel2.Width) { btnY += btnHeight + 5; btnX = 5; } btn.BackColor = noneBackColor; btn.ForeColor = noneForeColor; btn.Click += new EventHandler(btn_Click); groupBox_QueueList.Controls.Add(btn); try { if (int.Parse(desk.DeskId) > max) { max = int.Parse(desk.DeskId); } } catch (Exception) { } } queue = max; }
private void BindData() { DataTable dt = new DataTable(); dt.Columns.Add("IsUpdate", typeof(bool)); dt.Columns.Add("ItemId", typeof(string)); dt.Columns.Add("ItemName", typeof(string)); dt.Columns.Add("CurrentItemStok", typeof(decimal)); dt.Columns.Add("ItemStok", typeof(decimal)); DataRow dr; IList listItem = DataMaster.GetAll(typeof(MItem)); MItem item; ItemGudangStok stok; for (int i = 0; i < listItem.Count; i++) { item = (MItem)listItem[i]; dr = dt.NewRow(); dr[0] = false; dr[1] = item.ItemId; dr[2] = item.ItemName; stok = (ItemGudangStok)DataMaster.GetObjectByProperty(typeof(ItemGudangStok), ItemGudangStok.ColumnNames.ItemId, item.ItemId); if (stok != null) { dr[3] = stok.ItemStok; dr[4] = stok.ItemStok; } else { dr[3] = 0; dr[4] = 0; } dt.Rows.Add(dr); } itemGudangStokDataGridView.DataSource = dt; itemGudangStokDataGridView.Show(); }
internal static void FillGudangComboBox(ComboBox gudangIdComboBox) { DataMasterMgtServices DataMaster = new DataMasterMgtServices(); gudangIdComboBox.DropDownStyle = ComboBoxStyle.DropDownList; DataTable dt = new DataTable(); dt.Columns.Add(MGudang.ColumnNames.GudangId); dt.Columns.Add(MGudang.ColumnNames.GudangName); DataRow dr; IList listGudangType = DataMaster.GetAll(typeof(MGudang)); MGudang gudang = new MGudang(); //gudang.GudangId = 0; gudang.GudangName = "- Lokasi -"; dr = dt.NewRow(); dr[0] = 0; dr[1] = gudang.GudangName; dt.Rows.Add(dr); for (int i = 0; i < listGudangType.Count; i++) { gudang = (MGudang)listGudangType[i]; dr = dt.NewRow(); dr[0] = gudang.GudangId; dr[1] = gudang.GudangName; dt.Rows.Add(dr); } gudangIdComboBox.DataSource = dt; gudangIdComboBox.DisplayMember = MGudang.ColumnNames.GudangName; gudangIdComboBox.ValueMember = MGudang.ColumnNames.GudangId; gudangIdComboBox.Show(); }
private void CreateItemFilter() { Label l = new Label(); l.Location = new Point(9, 50); l.Text = "Type Unit"; l.AutoSize = true; groupBox1.Controls.Add(l); //type unit cb_ItemId = new ComboBox(); cb_ItemId.Location = new Point(100, 50); cb_ItemId.Width = 150; cb_ItemId.DropDownStyle = ComboBoxStyle.DropDownList; cb_ItemId.ValueMember = MItem.ColumnNames.ItemId; cb_ItemId.DisplayMember = MItem.ColumnNames.ItemName; cb_ItemId.SelectedIndexChanged += new EventHandler(cb_ItemId_SelectedIndexChanged); cb_ItemId.DataSource = DataMaster.GetAll(typeof(MItem)); cb_ItemId.Show(); groupBox1.Controls.Add(cb_ItemId); groupBox1.Size = new Size(groupBox1.Size.Width, groupBox1.Size.Height + 50); tableLayoutPanel1.RowStyles[0].Height += 50; }
public FormMasterItem() { InitializeComponent(); DataGridViewColumn grid_Col; //add kolom kode grid_Col = new DataGridViewColumn(); grid_Col.CellTemplate = new DataGridViewTextBoxCell(); grid_Col.DataPropertyName = MItem.ColumnNames.ItemId; grid_Col.HeaderText = "Kode Barang"; grid_Master.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 = "Nama Barang"; grid_Master.Columns.Add(grid_Col); ////add kolom satuan //grid_Col = new DataGridViewColumn(); //grid_Col.CellTemplate = new DataGridViewTextBoxCell(); //grid_Col.DataPropertyName = MItem.ColumnNames.ItemSatuan; //grid_Col.HeaderText = "Satuan"; //grid_Master.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 = "Harga Beli"; grid_Col.DefaultCellStyle.Format = "N"; grid_Col.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; grid_Master.Columns.Add(grid_Col); //add kolom harga per jual grid_Col = new DataGridViewColumn(); grid_Col.CellTemplate = new DataGridViewTextBoxCell(); grid_Col.DataPropertyName = MItem.ColumnNames.ItemPriceMax; grid_Col.HeaderText = "Harga Jual Retail"; grid_Col.DefaultCellStyle.Format = "N"; grid_Col.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; grid_Master.Columns.Add(grid_Col); //add kolom harga per jual grosir grid_Col = new DataGridViewColumn(); grid_Col.CellTemplate = new DataGridViewTextBoxCell(); grid_Col.DataPropertyName = MItem.ColumnNames.ItemPriceMaxVip; grid_Col.HeaderText = "Harga Jual Grosir"; grid_Col.DefaultCellStyle.Format = "N"; grid_Col.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; grid_Master.Columns.Add(grid_Col); bindingSource_Master.PositionChanged += new EventHandler(bindingSource_Master_PositionChanged); bindingNavigatorAddNewItem.Click += new EventHandler(bindingNavigatorAddNewItem_Click); bindingNavigatorEditItem.Click += new EventHandler(bindingNavigatorEditItem_Click); bindingNavigatorDeleteItem.Click += new EventHandler(bindingNavigatorDeleteItem_Click); bindingNavigatorSaveItem.Click += new EventHandler(bindingNavigatorSaveItem_Click); bindingNavigatorRefresh.Click += new EventHandler(bindingNavigatorRefresh_Click); //set numeric updown ModuleControlSettings.SetNumericUpDown(itemPricePurchaseNumericUpDown); ModuleControlSettings.SetNumericUpDown(itemPriceMaxNumericUpDown); ModuleControlSettings.SetNumericUpDown(itemPricePurchaseAvgNumericUpDown, true); ModuleControlSettings.SetNumericUpDown(itemPriceMaxVipNumericUpDown); mItemTypeBindingSource.DataSource = DataMaster.GetAll(typeof(MItemType)); }
private void CreateSupllierAccountTab() { tabControl_Account.TabPages.Clear(); TabPage tab; Label lbl; ComboBox combo; TextBox txt; string curName; Type curs = typeof(ListOfCurrency); foreach (string s in Enum.GetNames(curs)) { curName = Enum.Parse(curs, s).ToString(); tab = new TabPage(); tab.Name = "tabpages_" + curName; tab.Text = "Rekening " + curName; tab.UseVisualStyleBackColor = true; //add label gudang lbl = new Label(); lbl.Text = "Bank"; lbl.AutoSize = true; lbl.Location = new Point(11, 18); tab.Controls.Add(lbl); //add combo bank combo = new ComboBox(); combo.Name = "bankIdComboBox" + curName; combo.Location = new Point(139, 15); combo.DataSource = DataMaster.GetAll(typeof(MBank)); combo.DisplayMember = MBank.ColumnNames.BankName; combo.ValueMember = MBank.ColumnNames.BankId; combo.DropDownStyle = ComboBoxStyle.DropDownList; tab.Controls.Add(combo); //add label rek atas nama lbl = new Label(); lbl.Text = "Rekening Atas Nama :"; lbl.AutoSize = true; lbl.Location = new Point(11, 45); tab.Controls.Add(lbl); //add txt rek atas nama txt = new TextBox(); txt.Name = "supplierAccountNameTextBox" + curName; txt.Location = new Point(139, 42); tab.Controls.Add(txt); //add label rek no lbl = new Label(); lbl.Text = "Nomor Rekening :"; lbl.AutoSize = true; lbl.Location = new Point(11, 71); tab.Controls.Add(lbl); //add txt rek atas nama txt = new TextBox(); txt.Name = "supplierAccountNoTextBox" + curName; txt.Location = new Point(139, 68); tab.Controls.Add(txt); tabControl_Account.TabPages.Add(tab); } }