Exemplo n.º 1
0
        public void InsertRefuse(string pareaname, string pareaid, double platitude, string plongitude)
        {
            //create the storage account
            //maybe move the code to a controller based class and call the method from there

            //

            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString);

            CloudTableClient tableClient = storageAccount.CreateCloudTableClient();

            CloudTable table = tableClient.GetTableReference("Refuse");

            DateTime nowDate = DateTime.Now;

            DateTime collectionDate = nowDate.AddYears(1000);

            RefuseEntity refuse = new RefuseEntity(pareaname, pareaid, platitude, plongitude, nowDate, false, collectionDate);

            TableOperation insertOperation = TableOperation.Insert(refuse);

            table.Execute(insertOperation);
        }
Exemplo n.º 2
0
        public void InsertRefuse(string pareaname, string pareaid, double platitude, string plongitude)
        {
            //create the storage account
            //maybe move the code to a controller based class and call the method from there

            //

            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString);

            CloudTableClient tableClient = storageAccount.CreateCloudTableClient();

            CloudTable table = tableClient.GetTableReference("Refuse");

            DateTime nowDate = DateTime.Now;

            DateTime collectionDate = nowDate.AddYears(1000);

            RefuseEntity refuse = new RefuseEntity(pareaname, pareaid, platitude, plongitude, nowDate, false, collectionDate);
           
            TableOperation insertOperation = TableOperation.Insert(refuse);

            table.Execute(insertOperation);

        }