private void ProcessButton_Click(object sender, EventArgs e) { PerformValidation(); if (JobValidated && SuffixValidated && QtyValidated && OperNumValidated && LocValidated && (LotValidated || !LotTracked) && SNPicked) { SLDcjms.CurrentTable.Rows.Clear(); DataRow Row = SLDcjms.CurrentTable.NewRow(); Row["TransNum"] = SLDcjms.NextTransNum(); //TransNum Row["TransType"] = "3"; //TransType Row["Stat"] = "U"; //Stat Row["Termid"] = CSISystemContext.GetDeviceId(); //Termid Row["TransDate"] = DateTime.Now; //TransDate Row["Whse"] = CSISystemContext.DefaultWarehouse; //Whse Row["EmpNum"] = CSISystemContext.EmpNum; //EmpNum Row["Job"] = JobEdit.Text; //Item Row["Suffix"] = SuffixEdit.Text; //UM Row["Qty"] = QtyEdit.Text; //QtyMoved Row["OperNum"] = OperNumEdit.Text; //OperNum Row["Loc"] = LocEdit.Text; //Loc Row["Lot"] = LotEdit.Text; //Lot SLDcjms.CurrentTable.Rows.Add(Row); //Row.BeginEdit(); //Row.EndEdit(); //Row.AcceptChanges(); SetKeyValues(GetString(Resource.String.JobOrder), JobEdit.Text, GetString(Resource.String.Suffix), SuffixEdit.Text); SLDcjms.InsertIDO(); ShowProgressBar(true); } }
private void ProcessButton_Click(object sender, EventArgs e) { PerformValidation(); if (ItemValidated && UMValidated && QtyValidated && LocValidated && (LotValidated || !LotTracked) && ReasonValidated && SNPicked) { SLDcitems.CurrentTable.Rows.Clear(); DataRow Row = SLDcitems.CurrentTable.NewRow(); Row["TransNum"] = SLDcitems.NextTransNum(); //TransNum Row["TransType"] = "3"; //TransType Row["Stat"] = "U"; //Stat Row["Termid"] = CSISystemContext.GetDeviceId(); //Termid Row["TransDate"] = DateTime.Now; //TransDate Row["Whse"] = CSISystemContext.DefaultWarehouse; //Whse Row["EmpNum"] = CSISystemContext.EmpNum; //EmpNum Row["Item"] = ItemEdit.Text; //Item Row["UM"] = UMEdit.Text; //UM Row["CountQty"] = QtyEdit.Text; //CountQty Row["Loc"] = LocEdit.Text; //Loc Row["Lot"] = LotEdit.Text; //Lot Row["ReasonCode"] = ReasonEdit.Text; //ReasonCode SLDcitems.CurrentTable.Rows.Add(Row); //Row.BeginEdit(); //Row.EndEdit(); //Row.AcceptChanges(); SetKeyValues(GetString(Resource.String.Item), ItemEdit.Text);//Item SLDcitems.InsertIDO(); ShowProgressBar(true); } }
public DCMiscReceiveFragment(CSIBaseActivity activity = null) : base(activity) { Title = Application.Context.GetString(Resource.String.MiscReceive); CSISystemContext.ReadConfigurations(); SLDcitems = new CSIDcitems(CSISystemContext); SLDcitems.AddProperty("TransNum"); SLDcitems.AddProperty("TransType"); SLDcitems.AddProperty("Stat"); SLDcitems.AddProperty("Termid"); SLDcitems.AddProperty("TransDate"); SLDcitems.AddProperty("Whse"); SLDcitems.AddProperty("EmpNum"); SLDcitems.AddProperty("Item"); SLDcitems.AddProperty("UM"); SLDcitems.AddProperty("CountQty"); SLDcitems.AddProperty("Loc"); SLDcitems.AddProperty("Lot"); SLDcitems.AddProperty("ReasonCode"); SLDcitems.AddProperty("DocumentNum"); SLDcitems.AddProperty("ErrorMessage"); SLDcitems.SetFilter("1=0"); SLDcitems.UseAsync(false); SLDcitems.LoadIDO(); SLDcitems.UseAsync(true); SLDcitems.SaveDataSetCompleted += SLDcitems_SaveDataSetCompleted; SLDcitems.LoadDataSetCompleted += SLDcitems_LoadDataSetCompleted; SLDcitems.CallMethodCompleted += SLDcitems_CallMethodCompleted; }
private void ProcessButton_Click(object sender, EventArgs e) { PerformValidation(); if (PoNumValidated && LineValidated && ReleaseValidated && UMValidated && QtyValidated && LocValidated && (LotValidated || !LotTracked) && SNPicked) { SLDcpos.CurrentTable.Rows.Clear(); DataRow Row = SLDcpos.CurrentTable.NewRow(); Row["TransNum"] = SLDcpos.NextTransNum(); //TransNum Row["TransType"] = "1"; //TransType 1:Ship 2:Return Row["Stat"] = "U"; //Stat Row["Termid"] = CSISystemContext.GetDeviceId(); //Termid Row["TransDate"] = DateTime.Now; //TransDate Row["Whse"] = CSISystemContext.DefaultWarehouse; //Whse Row["EmpNum"] = CSISystemContext.EmpNum; //EmpNum Row["PoNum"] = PoNumEdit.Text; //PoNum Row["PoLine"] = LineEdit.Text; //PoLine Row["PoRelease"] = ReleaseEdit.Text; //Release Row["Item"] = ItemText.Text; //Item Row["QtyReceived"] = QtyEdit.Text; //QtyShipped Row["UM"] = UMEdit.Text; //UM Row["Loc"] = LocEdit.Text; //Loc Row["Lot"] = LotEdit.Text; //Lot //Row["ReasonCode"] = ReasonCodeEdit.Text;//ReasonCode SLDcpos.CurrentTable.Rows.Add(Row); //Row.BeginEdit(); //Row.EndEdit(); //Row.AcceptChanges(); SetKeyValues(GetString(Resource.String.OrderNumber), PoNumEdit.Text, GetString(Resource.String.OrderLine), LineEdit.Text, GetString(Resource.String.OrderRelease), ReleaseEdit.Text); SLDcpos.InsertIDO(); ShowProgressBar(true); } }
private void OnCreateSessionTokenCompleted(object sender, CreateSessionTokenCompletedEventArgs e) { if (e.Error == null) { CSISystemContext.Token = e.Result; CSISystemContext.SavedUser = UserEdit.Text; CSISystemContext.SavedPassword = PasswordEdit.Text; CSISystemContext.SaveUser = SaveUserSwitch.Checked; CSISystemContext.SavePassword = SavePasswordSwitch.Checked; CSISystemContext.Configuration = (string)ConfigurationEdit.SelectedItem; CSISystemContext.WriteConfigurations(); if (!string.IsNullOrEmpty(CSISystemContext.Token)) { GetParmInfor(); } } else { WriteErrorLog(e.Error); ErrorText.Text = CSIBaseInvoker.TranslateError(e.Error); ErrorText.Visibility = ViewStates.Visible; } ShowProgressBar(false); }
public DCOrderShippingFragment(CSIBaseActivity activity = null) : base(activity) { Title = Application.Context.GetString(Resource.String.SalesShip); CSISystemContext.ReadConfigurations(); SLDccos = new CSIDccos(CSISystemContext); SLDccos.AddProperty("TransNum"); SLDccos.AddProperty("TransType"); SLDccos.AddProperty("Stat"); SLDccos.AddProperty("Termid"); SLDccos.AddProperty("TransDate"); SLDccos.AddProperty("EmpNum"); SLDccos.AddProperty("CoNum"); SLDccos.AddProperty("CoLine"); SLDccos.AddProperty("CoRelease"); SLDccos.AddProperty("Item"); SLDccos.AddProperty("UM"); SLDccos.AddProperty("Whse"); SLDccos.AddProperty("Loc"); SLDccos.AddProperty("Lot"); SLDccos.AddProperty("QtyShipped"); SLDccos.AddProperty("QtyReturned"); SLDccos.AddProperty("ReasonCode"); SLDccos.AddProperty("DocumentNum"); SLDccos.AddProperty("ErrorMessage"); SLDccos.SetFilter("1=0"); SLDccos.UseAsync(false); SLDccos.LoadIDO(); SLDccos.UseAsync(true); SLDccos.SaveDataSetCompleted += SLDccos_SaveDataSetCompleted; SLDccos.LoadDataSetCompleted += SLDccos_LoadDataSetCompleted; SLDccos.CallMethodCompleted += SLDccos_CallMethodCompleted; }
private void SaveConfiguration() { CSISystemContext.CSIWebServerName = CSIWebServerEdit.Text; CSISystemContext.Configuration = (string)ConfigurationSpinner.SelectedItem; CSISystemContext.Theme = InterpretThemeValue((string)ThemeSpinner.SelectedItem); CSISystemContext.SavedUser = UserEdit.Text; CSISystemContext.SavedPassword = PasswordEdit.Text; CSISystemContext.EnableHTTPS = EnableHTTPSSwitch.Checked; CSISystemContext.UseRESTForRequest = UseRESTForRequestSwitch.Checked; CSISystemContext.LoadPicture = LoadPictureSwitch.Checked; CSISystemContext.ForceAutoPost = ForceAutoPostSwitch.Checked; CSISystemContext.ShowSuccessMessage = ShowSuccessMessageSwitch.Checked; CSISystemContext.RecordCap = RecordCapEdit.Text; CSISystemContext.SaveUser = SaveUserSwitch.Checked; CSISystemContext.SavePassword = SavePasswordSwitch.Checked; CSISystemContext.WriteConfigurations(); }
public DCJobMaterialTransactionsFragment(CSIBaseActivity activity = null) : base(activity) { Title = Application.Context.GetString(Resource.String.JobMaterial); CSISystemContext.ReadConfigurations(); SLDcjms = new CSIDcjms(CSISystemContext); SLDcjms.AddProperty("TransNum"); SLDcjms.AddProperty("TransType"); SLDcjms.AddProperty("Stat"); SLDcjms.AddProperty("Termid"); SLDcjms.AddProperty("TransDate"); SLDcjms.AddProperty("EmpNum"); SLDcjms.AddProperty("Job"); SLDcjms.AddProperty("Suffix"); SLDcjms.AddProperty("JobItem"); SLDcjms.AddProperty("CoProductMix"); SLDcjms.AddProperty("DerCoItem"); SLDcjms.AddProperty("OperNum"); SLDcjms.AddProperty("JobrtWc"); SLDcjms.AddProperty("JobItemLotTracked"); SLDcjms.AddProperty("JobItemSerialTracked"); SLDcjms.AddProperty("ItemSerialPrefix"); SLDcjms.AddProperty("Whse"); SLDcjms.AddProperty("Loc"); SLDcjms.AddProperty("Lot"); SLDcjms.AddProperty("Item"); SLDcjms.AddProperty("ItemLotTracked"); SLDcjms.AddProperty("ItemSerialTracked"); SLDcjms.AddProperty("JobmatlUM"); SLDcjms.AddProperty("UM"); SLDcjms.AddProperty("Qty"); SLDcjms.AddProperty("DocumentNum"); SLDcjms.AddProperty("ErrorMessage"); SLDcjms.SetFilter("1=0"); SLDcjms.UseAsync(false); SLDcjms.LoadIDO(); SLDcjms.UseAsync(true); SLDcjms.SaveDataSetCompleted += SLDcjms_SaveDataSetCompleted; SLDcjms.LoadDataSetCompleted += SLDcjms_LoadDataSetCompleted; SLDcjms.CallMethodCompleted += SLDcjms_CallMethodCompleted; }
public ChangeWarehouseFragment(CSIBaseActivity activity = null) : base(activity) { Title = Application.Context.GetString(Resource.String.ChangeWarehouse); CSISystemContext.ReadConfigurations(); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { string question = Arguments.GetString(MODULE_NAME, ""); base.OnCreateView(inflater, container, savedInstanceState); Context contextThemeWrapper; switch (CSISystemContext.Theme) { case "Light": contextThemeWrapper = new ContextThemeWrapper(BaseActivity, Resource.Style.MyTheme_Light_Base); break; default: contextThemeWrapper = new ContextThemeWrapper(BaseActivity, Resource.Style.MyTheme_Base); break; } // clone the inflater using the ContextThemeWrapper LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper); // Inflate this fragment from the "flashcard_layout" View view = localInflater.Inflate(Resource.Layout.CSIModule, container, false); GridView ModuleGrid = view.FindViewById <GridView>(Resource.Id.ModuleGrid); ModuleGridViewerAdapter GridAdapter = new ModuleGridViewerAdapter((Android.Support.V4.App.Fragment) this, ModuleGrid); if (Module == null) { MainActivity act = (MainActivity)BaseActivity; Module = act.Modules[act.ModulePage.CurrentItem]; } foreach (ModuleAction Action in Module.ModuleActions) { if (Action.Visible) { GridAdapter.ActionItems.Add(Action); } } ModuleGrid.Adapter = GridAdapter; ModuleGrid.ItemClick += delegate(object sender, ItemClickEventArgs args) { ModuleAction Action = (ModuleAction)GridAdapter.ActionItems[args.Position]; //Toast.MakeText(ModuleGrid.Context, Action.ActionName, ToastLength.Short).Show(); if (Action.InvokeCommands.Length > 0) { foreach (string command in Action.InvokeCommands) { if (Action.Enabled) { if (!BaseActivity.InvokeCommand(command)) { return; } } } } else if (Action.ActivityType != null) { Bundle bundle = CSISystemContext.BuildBundle(); Intent intent = new Intent(Application.Context, Action.ActivityType); intent.PutExtra("CSISystemContext", bundle); StartActivity(intent); } }; return(view); }
public SettingsDialogFragment(CSIBaseActivity activity = null) : base(activity) { CSISystemContext.ReadConfigurations(); }
private void SetDetailList() { ArrayAdapter adapter = new ArrayAdapter(Application.Context, Android.Resource.Layout.SimpleGalleryItem); adapter.Add(string.Format("{0}: {1}", Application.Context.GetString(Resource.String.Site), CSISystemContext.Site)); adapter.Add(string.Format("{0}: {1}", Application.Context.GetString(Resource.String.Warehouse), CSISystemContext.DefaultWarehouse)); adapter.Add(string.Format("{0}: {1}", Application.Context.GetString(Resource.String.Device), CSISystemContext.GetDeviceId())); adapter.Add(string.Format("{0}: {1}", Application.Context.GetString(Resource.String.RegisterLicense), Application.Context.GetString(Resource.String.NoLicensed))); adapter.Add(string.Format("{0}: {1}", Application.Context.GetString(Resource.String.ExpirationDate), CSISystemContext.ExpDate)); ListView.Adapter = adapter; }
public AboutDialogFragment(CSIBaseActivity activity = null) : base(activity) { Title = Application.Context.GetString(Resource.String.About); CSISystemContext.ReadConfigurations(); }
protected override void OnCreate(Bundle bundle) { try { base.OnCreate(bundle); if (CSISystemContext == null) { CSISystemContext = new CSIContext(); } CSISystemContext.ReadConfigurations(); SetContentView(Resource.Layout.CSIMain); ModulePage = FindViewById <ViewPager>(Resource.Id.ModulePage); // Instantiate the deck of flash cards: Modules = new ModuleDeck(CSISystemContext); // Instantiate the adapter and pass in the deck of flash cards: DeckAdapter = new ModuleDeckAdapter(SupportFragmentManager, Modules, this); // Find the ViewPager and plug in the adapter: ModulePage.Adapter = DeckAdapter; ModulePage.PageSelected += (o, e) => { GetModuleDeck(); }; MoudleButton[0] = FindViewById <TextView>(Resource.Id.MoudleButton1); MoudleButton[1] = FindViewById <TextView>(Resource.Id.MoudleButton2); MoudleButton[2] = FindViewById <TextView>(Resource.Id.MoudleButton3); MoudleButton[3] = FindViewById <TextView>(Resource.Id.MoudleButton4); MoudleButton[0].Visibility = ViewStates.Gone; MoudleButton[1].Visibility = ViewStates.Gone; MoudleButton[2].Visibility = ViewStates.Gone; MoudleButton[3].Visibility = ViewStates.Gone; int usedPosition = 0; for (int index = 0; index < Modules.NumModules; index++) { if (Modules[index].Visible) { MoudleButton[usedPosition].Visibility = ViewStates.Visible; MoudleButton[usedPosition].Text = Modules[index].ModuleName; Modules[index].DisplayPosition = usedPosition; MoudleButton[usedPosition].Tag = usedPosition; usedPosition++; } } MoudleButton[0].Click += (o, e) => { SetModuleDeck(int.Parse(MoudleButton[0].Tag.ToString())); }; MoudleButton[1].Click += (o, e) => { SetModuleDeck(int.Parse(MoudleButton[1].Tag.ToString())); }; MoudleButton[2].Click += (o, e) => { SetModuleDeck(int.Parse(MoudleButton[2].Tag.ToString())); }; MoudleButton[3].Click += (o, e) => { SetModuleDeck(int.Parse(MoudleButton[3].Tag.ToString())); }; SetModuleDeck(CSISystemContext.CurrentPageIndex); GetModuleDeck(); //Show SignIn if (string.IsNullOrEmpty(CSISystemContext.CSIWebServerName)) { ShowSettingsDialog(); } else { if (string.IsNullOrEmpty(CSISystemContext.Token)) { ShowSignInDialog(); } } //Task startupWork = new Task(() => { ShowSignInDialog(); }); //startupWork.Start(); } catch (Exception Ex) { WriteErrorLog(Ex); } }