Ejemplo n.º 1
0
        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;
        }
        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;
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 5
0
 public SettingsDialogFragment(CSIBaseActivity activity = null) : base(activity)
 {
     CSISystemContext.ReadConfigurations();
 }
Ejemplo n.º 6
0
        public AboutDialogFragment(CSIBaseActivity activity = null) : base(activity)
        {
            Title = Application.Context.GetString(Resource.String.About);

            CSISystemContext.ReadConfigurations();
        }
Ejemplo n.º 7
0
        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);
            }
        }