protected void MakeOrderAccept_ServerClick(object sender, EventArgs e) { if (usernameTxt.Value != null && userPhoneTxt.Value != null && adressTxt.Value != null && amountTxt.Value != null && datePicker.Value != null) { OrderProduct order = new OrderProduct(usernameTxt.Value, userPhoneTxt.Value, adressTxt.Value, Convert.ToInt32(Session["IDP"]), Convert.ToInt32(amountTxt.Value), datePicker.Value); Notification notification = new Notification("Se ha realizado un nuevo pedido a nombre de " + usernameTxt.Value + ". Recuerde revisarla cuanto antes.", false); NotificationBusiness notificationBusiness = new NotificationBusiness(); notificationBusiness.AddNotificationService(notification); resultMessage.InnerText = orderBusiness.CreateOrderBusiness(order); } else { resultMessage.InnerText = "Debe llenar todos los campos requeridos."; } ModalPopupExtender1.Show(); }