private bool Save() { bool result = false; if (Verify()) { Cursor.Current = Cursors.WaitCursor; #region 2013.12.22 paulus: 舊 code,唔再用 //this.ProductId = SaveGeneralInfo(); //if (this.ProductId != System.Guid.Empty) //{ // SaveProductCurrentSummary(this.ProductId); // SaveQtyInfo(); // SaveOrderInfo(); // SaveDiscountInfo(); // result = true; //} #endregion if (_ProductId == Guid.Empty) { SaveAsNewProduct(); } else { DAL.Product oProduct = DAL.Product.Load(_ProductId); oProduct.Status = Convert.ToInt32(RT2020.DAL.Common.Enums.Status.Modified.ToString("d")); oProduct.ModifiedBy = RT2020.DAL.Common.Config.CurrentUserId; oProduct.ModifiedOn = DateTime.Now; oProduct.Save(); } if (_ProductId != Guid.Empty) { general.SaveRec(_ProductId); if (tpQty.Contains(quantity)) { quantity.SaveRec(_ProductId); } if (tpMisc.Contains(misc)) { misc.SaveRec(_ProductId); } if (tpOrder.Contains(order)) { order.SaveRec(_ProductId); } if (tpDiscount.Contains(discount)) { discount.SaveRec(_ProductId); } result = true; } Cursor.Current = Cursors.Default; } return(result); }