protected void SubmitButton_Click(object sender, EventArgs e) { int productId = RequestHelper.GetQueryString <int>("Id"); PointProductInfo pointProductSubmit = PointProductBLL.Read(productId); pointProductSubmit.Id = productId; pointProductSubmit.Name = Name.Text; pointProductSubmit.SubTitle = SubTitle.Text; pointProductSubmit.Point = Convert.ToInt32(Point.Text); pointProductSubmit.TotalStorageCount = Convert.ToInt32(TotalCount.Text); pointProductSubmit.BeginDate = Convert.ToDateTime(BeginDate.Text); pointProductSubmit.EndDate = Convert.ToDateTime(EndDate.Text); pointProductSubmit.MarketPrice = Convert.ToDecimal(MarketPrice.Text); pointProductSubmit.Photo = Photo.Text; pointProductSubmit.Introduction1 = Introduction.Value; pointProductSubmit.Introduction1_Mobile = Introduction_Mobile.Value; pointProductSubmit.IsSale = RequestHelper.GetForm <int>("IsSale"); pointProductSubmit.AddDate = RequestHelper.DateNow; string alertMessage = ShopLanguage.ReadLanguage("AddOK"); if (pointProductSubmit.Id <= 0) { CheckAdminPower("AddPointProduct", PowerCheckType.Single); int id = PointProductBLL.Add(pointProductSubmit); if (id > 0) { AddProductPhoto(id); } AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("PointProduct"), id); } else { CheckAdminPower("UpdatePointProduct", PowerCheckType.Single); ProductPhotoBLL.DeleteList(productId, 0); AddProductPhoto(productId); PointProductBLL.Update(pointProductSubmit); AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("PointProduct"), pointProductSubmit.Id); alertMessage = ShopLanguage.ReadLanguage("UpdateOK"); } ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl); }