Пример #1
0
        private static void addBodyRows(PlacesData ds)
        {
            Debug.WriteLine("PrepareData.addBodyRows started");

            var t = ds.DocPlcMoveBody;
            var r = t.NewDocPlcMoveBodyRow();

            r.rowid = Guid.NewGuid();
            r.DocID = AppSetup.DOC_ID;
            r.npp = 1;
            r.CodeN = AppSetup.CODE1;
            r.Series = "1232";
            r.Expiration = new DateTime(2015, 1, 10);
            r.Qty = 50;
            r.SourcePlaceID = "010101";
            r.TargetPlaceID = "020202";
            r.FixTime = System.Data.SqlTypes.SqlDateTime.MinValue.Value;
            r.RowStatus = 0;

            t.AddDocPlcMoveBodyRow(r);

            r = t.NewDocPlcMoveBodyRow();

            r.rowid = Guid.NewGuid();
            r.DocID = AppSetup.DOC_ID;
            r.npp = 2;
            r.CodeN = AppSetup.CODE2;
            r.Series = "1232";
            r.Expiration = new DateTime(2015, 10, 1).Date;
            r.Qty = 50;
            r.SourcePlaceID = "010101";
            r.TargetPlaceID = "030303";
            r.FixTime = System.Data.SqlTypes.SqlDateTime.MinValue.Value;
            r.RowStatus = 0;

            t.AddDocPlcMoveBodyRow(r);
            r = t.NewDocPlcMoveBodyRow();

            r.rowid = Guid.NewGuid();
            r.DocID = AppSetup.DOC_ID;
            r.npp = 3;
            r.CodeN = AppSetup.CODE3;
            r.Series = "1232";
            r.Expiration = new DateTime(2015, 10, 1).Date;
            r.Qty = 50;
            r.SourcePlaceID = "010101";
            r.TargetPlaceID = "040404";
            r.FixTime = System.Data.SqlTypes.SqlDateTime.MinValue.Value;
            r.RowStatus = 0;

            t.AddDocPlcMoveBodyRow(r);

            Debug.WriteLine("PrepareData.addBodyRows finished");
        }
Пример #2
0
 public ApplicationState(
     IImmutableDictionary <PermissionName, AsyncOperationState <PermissionStatus, Unit> > permissionsDictionary,
     Stack <PageName> navigationStack,
     Settings settings,
     PlacesData placesData,
     DeviceData deviceData,
     ErrorState error,
     UserState userState
     )
 {
     PermissionsDictionary = permissionsDictionary;
     NavigationStack       = navigationStack;
     Settings   = settings;
     PlacesData = placesData;
     DeviceData = deviceData;
     Error      = error;
     UserState  = userState;
 }
Пример #3
0
        public static void GenerateDocData()
        {
            try
            {

                PlacesData ds = new PlacesData();

                addHead(ds);
                addBodyRows(ds);

                saveData(ds);
            }
            catch(Exception ex)
            {
                Debug.WriteLine("ERROR in PrepareData.GenerateDocData");
                Debug.WriteLine(ex.ToString());
                throw ex;
            }
        }
Пример #4
0
        private static void addHead(PlacesData ds)
        {
            Debug.WriteLine("PrepareData.addHead started");

            var t = ds.DocPlcMoveHead;
            var r = t.NewDocPlcMoveHeadRow();

            r.DocID = AppSetup.DOC_ID;
            r.Reason = "Тестовый документ";
            r.WorkerID = 1;

            t.AddDocPlcMoveHeadRow(r);

            Debug.WriteLine("PrepareData.addHead finished");
        }
Пример #5
0
        private static void saveData(PlacesData ds)
        {
            Debug.WriteLine("PrepareData.saveData started");

            var ta_head = new PlacesDataTableAdapters.ta_DocPlcMoveHead();
            ta_head.Connection = new System.Data.SqlClient.SqlConnection(AppSetup.CN_STR);

            ta_head.Update(ds.DocPlcMoveHead);

            var ta_body = new PlacesDataTableAdapters.ta_DocPlcMoveBody();
            ta_body.Connection = new System.Data.SqlClient.SqlConnection(AppSetup.CN_STR);

            ta_body.DeleteDocRows(AppSetup.DOC_ID);
            ta_body.Update(ds.DocPlcMoveBody);

            Debug.WriteLine("PrepareData.saveData finished");
        }
 public Base.Response<PlacesResult> DownloadDistricts(PlacesData county)
 {
     return this.DownloadPlaces(this.Settings.NewQuery("districts/", county.WOEID.ToString()));
 }        
 public Base.Response<PlacesResult> DownloadCounty(PlacesData state)
 {
     return this.DownloadPlaces(this.Settings.NewQuery("counties/", state.WOEID.ToString()));
 }
 public Base.Response<PlacesResult> DownloadStates(PlacesData country)
 {
     return this.DownloadPlaces(this.Settings.NewQuery("states/", country.WOEID.ToString()));
 }