예제 #1
0
 public void Init(OnlineProduct item)
 {
     if (item.Barcode == null)
     {
         item.Barcode = "";
     }
     if (item.IsBestSale == null)
     {
         item.IsBestSale = false;
     }
     if (item.IsNew == null)
     {
         item.IsNew = false;
     }
     if (item.UnitCode == null)
     {
         item.UnitCode = "";
     }
     if (item.Remain == null)
     {
         item.Remain = 0;
     }
     if (item.Price == null)
     {
         item.Price = 0;
     }
     if (item.WholeSalePrice == null)
     {
         item.WholeSalePrice = 0;
     }
     if (item.UpdatedDate == null)
     {
         item.UpdatedDate = DateTime.Now;
     }
 }
예제 #2
0
        void OnAddItemClicked(object sender, EventArgs e)
        {
            var OnlineProduct = new OnlineProduct();
            //var OnlineProduct = new OnlineProduct () {
            //	Id = Guid.NewGuid ().ToString ()
            //};
            var todoPage = new OnlineProductPage(true);

            todoPage.BindingContext = OnlineProduct;
            Navigation.PushAsync(todoPage);
        }