void FetchData() { ProvinceList = FetchTercAsync(CitySQL.SelectProvince()); CountyList = FetchTercAsync(CitySQL.SelectCounty()); CommunityList = FetchTercAsync(CitySQL.SelectCommunity()); simcList = FetchSimcAsync(); }
public long AddCity() { using (var scope = AppSession.TypeContainer.BeginLifetimeScope()) { var dbs = scope.Resolve <IDataBaseService>(); return(dbs.AddRecordAsync(CitySQL.InsertCity(), CreateInsertParams()).Result); } }
private void SimctoolStripMenuItem_Click(object sender, EventArgs e) { var frm = new frmSimc(CitySQL.SelectAllPlaceFromSimc()); SetFormProperties(frm); SimctoolStripMenuItem.Enabled = false; frm.TheEnd += (s, ex) => SimctoolStripMenuItem.Enabled = true; frm.Show(); }
private void cmdSimc_Click(object sender, EventArgs e) { using (var dlg = new frmSimc(CitySQL.SelectPlaceFromSimc())) { dlg.FormBorderStyle = FormBorderStyle.FixedDialog; dlg.MaximizeBox = false; dlg.MinimizeBox = false; dlg.cmdOK.Visible = true; dlg.cmdCancel.Text = "Anuluj"; dlg.AcceptButton = cmdOK; dlg.CancelButton = cmdCancel; if (dlg.ShowDialog() == DialogResult.OK) { LoadCity(dlg.City, true); } } }
void LoadSimc() { var S = new Simc(CitySQL.SelectSomePlaceFromSimc()); SimcList = S.CityListBySimc; }