private void OnLoadDataSetCompleted(object sender, LoadDataSetCompletedEventArgs e) { try { if (e.Error == null) { if (sender.GetType() == Users.GetType()) { CSISystemContext.User = Users.GetCurrentPropertyValueOfString("Username"); CSISystemContext.UserDesc = Users.GetCurrentPropertyValueOfString("UserDesc"); GetUserLocalInfor(); } if (sender.GetType() == UsersLocal.GetType()) { CSISystemContext.DefaultWarehouse = UsersLocal.GetCurrentPropertyValueOfString("Whse"); if (string.IsNullOrEmpty(CSISystemContext.DefaultWarehouse)) { CSISystemContext.DefaultWarehouse = "MAIN"; } GetEmpInfor(); } if (sender.GetType() == Employee.GetType()) { CSISystemContext.EmpNum = Employee.GetCurrentPropertyValueOfString("EmpNum"); CSISystemContext.EmpName = Employee.GetCurrentPropertyValueOfString("Name"); } ShowProgressBar(false); if (ProgressBar.Visibility == ViewStates.Invisible) { ErrorText.Visibility = ViewStates.Invisible; Dismiss(); Dispose(); } } else { ShowProgressBar(false); WriteErrorLog(e.Error); CSISystemContext.Token = ""; ErrorText.Text = CSIBaseInvoker.TranslateError(e.Error); ErrorText.Visibility = ViewStates.Visible; } }catch (Exception Ex) { ShowProgressBar(false); WriteErrorLog(Ex); WriteErrorLog(e.Error); CSISystemContext.Token = ""; ErrorText.Text = CSIBaseInvoker.TranslateError(e.Error); ErrorText.Visibility = ViewStates.Visible; } }
private void SLDcjms_LoadDataSetCompleted(object sender, LoadDataSetCompletedEventArgs e) { try { //throw new NotImplementedException(); if (e.Error == null) { } else { } } catch (Exception Ex) { WriteErrorLog(Ex); } ShowProgressBar(false); }
private void Parmse_LoadDataSetCompleted(object sender, LoadDataSetCompletedEventArgs e) { try { CSISystemContext.Site = Parms.GetCurrentPropertyValueOfString("Site"); GetUserInfor(); ShowProgressBar(false); } catch (Exception Ex) { ShowProgressBar(false); WriteErrorLog(Ex); WriteErrorLog(e.Error); CSISystemContext.Token = ""; ErrorText.Text = CSIBaseInvoker.TranslateError(e.Error); ErrorText.Visibility = ViewStates.Visible; } }