private void LoadArea() { displayPanel("Area"); if (formMode == enumFormMode.New) { txtArea.Text = ""; this.Text = "Wilayah"; this.Title = "Wilayah"; } else { DataTable dt = FillComboBox.DBGetArea(_rowID); txtArea.Text = Tools.isNull(dt.Rows[0]["Area"], "").ToString(); this.Text = "Wilayah Update"; this.Title = "Wilayah Update"; } }
private void LoadArea() { this.Cursor = Cursors.WaitCursor; dtArea = FillComboBox.DBGetArea(Guid.Empty); if (dtArea.Rows.Count > 0) { dtArea.DefaultView.Sort = "Area"; gridArea.DataSource = dtArea.DefaultView; this.LoadWilayah(); this.LoadKolektor(); } else { dtWilayah = new DataTable(); dtWilayah.Clear(); gridWilayah.DataSource = dtArea.DefaultView; dtKolektor = new DataTable(); dtKolektor.Clear(); gridKolektor.DataSource = dtKolektor.DefaultView; } }
public void RefreshRowData(string Sts, Guid _areaRowID, Guid _rowid) { using (Database db = new Database()) { switch (Sts) { case "Area": dtRefresh = FillComboBox.DBGetArea(Guid.Empty); break; case "Wilayah": dtRefresh = FillComboBox.DBGetWilayah(Guid.Empty, _areaRowID, Guid.Empty); break; case "Kolektor": dtRefresh = FillComboBox.DBGetAreaKolektor(Guid.Empty, _areaRowID, Guid.Empty); break; } } if (dtRefresh.Rows.Count > 0) { switch (Sts) { case "Area": gridArea.FindRow("RowID", _rowid.ToString()); break; case "Wilayah": gridWilayah.FindRow("WilRowID", _rowid.ToString()); break; case "Kolektor": gridKolektor.FindRow("KolRowID", _rowid.ToString()); break; } } }