Ejemplo n.º 1
0
        //=============================================================ADD Account====
        public async Task AddAccount(string custid, string firstname, string lastname, string phonenumber, string email, string address)
        {
            CustIDTracker idTracker = await GetCustID();

            CustomerID = idTracker.Customerid.ToString();
            custid     = CustomerID;
            await firebase
            .Child("Account").Child(idTracker.Customerid.ToString())
            .PutAsync(new AddAccountInfo()
            {
                CustID = custid, FirstName = firstname, LastName = lastname, PhoneNumber = phonenumber, Email = email, Address = address
            });

            //============
            //await CreateCurrentCustomer();
            Cid       = CustomerID;
            Lastname  = lastname;
            Firstname = firstname;
            //==========
            idTracker.Customerid++;//increase the cust id by one for the next customer
            await UpdateCustID(idTracker);
        }
Ejemplo n.º 2
0
 public async Task UpdateCoffinID(CustIDTracker idTracker)
 {
     await firebase
     .Child("IDs")
     .PutAsync(idTracker);
 }
Ejemplo n.º 3
0
        //===============================================================ADD Coffin
        public async Task AddCoffins(string cofid, string text, bool coffin, bool casket, bool height1, bool height2, bool height3, bool height4, bool height5,
                                     string coffinheight, string coffinsize, bool mdf, bool plywood, bool pine, string undercoat,
                                     string topcoat, string spraypaint, string woodstain, bool srlid, bool drlid, bool sscrews, bool gscrews, bool shandle, bool ghandle, bool whandle, bool rhandle,
                                     bool lining1, bool lining2, bool lining3, bool lining4, bool lining5, bool lining6, string customlining, string extras, string comments, bool strored, bool pickup,
                                     bool rotoruadel, bool nongotahadel, bool deliverynz, string deladdress, string deliverycomments)
        {
            CustIDTracker idTracker = await GetCoffinID();

            CoffinID = idTracker.Cofid.ToString();
            cofid    = CoffinID;


            await firebase
            .Child("Coffin").Child(idTracker.Cofid.ToString())
            .PutAsync(new AddCoffinInfo()
            {
                CoffinID         = CoffinID,
                CustID           = CustomerID,
                Coffin           = coffin,
                Casket           = casket,
                CoffinHeight     = coffinheight,
                CoffinSize       = coffinsize,
                Mdf              = mdf,
                Plywood          = plywood,
                Pine             = pine,
                UnderCoat        = undercoat,
                Topcoat          = topcoat,
                Spraypaint       = spraypaint,
                Woodstain        = woodstain,
                SRlid            = srlid,
                DRlid            = drlid,
                SScrews          = sscrews,
                GScrews          = gscrews,
                SHandle          = shandle,
                GHandle          = ghandle,
                WHandle          = whandle,
                RHandle          = rhandle,
                Lining1          = lining1,
                Lining2          = lining2,
                Lining3          = lining3,
                Lining4          = lining4,
                Lining5          = lining5,
                Lining6          = lining6,
                Customlining     = customlining,
                Extras           = extras,
                Comments         = comments,
                Stored           = strored,
                Pickup           = pickup,
                RotoruaDel       = rotoruadel,
                NongotahaDel     = nongotahadel,
                DeliveryNZ       = deliverynz,
                DelAddress       = deladdress,
                DeliveryComments = deliverycomments
            });

            //==============
            Casid = CoffinID;

            idTracker.Cofid++;//increse the id by one for the next coffin
            //==============
            await UpdateCoffinID(idTracker);
        }