protected void BtnLogn_Click(object Sender, EventArgs ev) { string Username = TxtUsername.Text; string Password = TxtPwd.Text; Loading LoadingMsg = new Loading("LOADING"); ISyncInvoke.InvokeAsync(this, (f) => { user LoggedUser = userClient.UserLogin(Username, Password); if (null != LoggedUser) { MessageBox.Show("Login Berhasil!", "Info"); RefForm.TheUser = new AppUser() { User = LoggedUser }; RefForm.UpdateForm(); LoadingMsg.Dispose(); this.Dispose(); } else { MessageBox.Show("Login Gagal!", "Info"); LoadingMsg.Dispose(); } }); }
public void ShowDetail(Panel _DetailPanel, Loading L) { ISyncInvoke.InvokeAsync(this, (f) => { try { DetailPanel.Controls.Clear(); DetailPanel.Controls.Add(_DetailPanel); } catch (Exception e) { MessageBox.Show("Server Error"); } L.Dispose(); }); }
private void GenerateTable(int Offset = 0, int Limit = 0) { this.Offset = Offset; this.Limit = Limit == 0 ? this.Limit : Limit; Loading LoadingMsg = new Loading("LOADING"); ISyncInvoke.InvokeAsync(this, (f) => { UpdateData(); if (this.ListPanel == null) { LoadingMsg.Dispose(); MessageBox.Show("Server error / data kosong\nTekan Clear untuk reset filter", "Error"); } else { SetListPanel(); GenerateNavButton(); UpdateInfoFilter(); LoadingMsg.Dispose(); } }); }