protected void btnFoodMenu_Click(object sender, EventArgs e) { try { if (CheckWeekday() == false) { if (ddlWeekdays.SelectedItem.Text.Length > 0) { string mobile = Session["s_MobileNo"].ToString(); uc.AddFooMenu(mobile, ddlWeekdays.SelectedItem.Value, ddlWeekdays.SelectedItem.Text, txtBreakfast.Text, txtBreakfastTime.Text, txtBreakfastTimeTo.Text, txtLunch.Text, txtLunchTime.Text, txtLunchTimeTo.Text, txtSnacks.Text, txtSnacksTime.Text, txttxtSnacksTimeTo.Text, txtDinner.Text, txtDinnarTime.Text, txtDinnerTimeTo.Text); string textmsg = "" + ddlWeekdays.SelectedItem.Text + " Menu Added Successfully !"; ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpopsuccess('" + textmsg + "')</script>", false); txtBreakfast.Text = string.Empty; txtBreakfastTime.Text = string.Empty; txtBreakfastTimeTo.Text = string.Empty; txtLunch.Text = string.Empty; txtLunchTime.Text = string.Empty; txtLunchTimeTo.Text = string.Empty; txtSnacks.Text = string.Empty; txtSnacksTime.Text = string.Empty; txttxtSnacksTimeTo.Text = string.Empty; txtDinner.Text = string.Empty; txtDinnarTime.Text = string.Empty; txtDinnerTimeTo.Text = string.Empty; btnFoodMenu.Visible = true; btnSaveChengeFoodMenu.Visible = false; } else { btnSaveChengeFoodMenu.Visible = true; } } } catch (Exception Ex) { string text = Ex.Message.ToString(); ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false); } }