protected void btnSave_Click(object sender, EventArgs e) { if (this.dtNewChoices.Rows.Count > 0) { BINROTA.BUS.Survey objSurvey = new BINROTA.BUS.Survey(); objSurvey.Save(this.SurveyID, bool.Parse(ddlisActive.SelectedValue), bool.Parse(ddlisMain.SelectedValue), txtSurveyQuestion.Text, this.dtNewChoices); ToFinish("ANKET BAÞARIYLA KAYDEDÝLDÝ"); } else { ToFinish("HATA!.. Anket için seçenekleri ekleyiniz."); } }
protected void rptSurveys_ItemCommand(object source, RepeaterCommandEventArgs e) { if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem) || (e.Item.ItemType == ListItemType.Footer)) { ArrayList arrQuestionID; if (e.CommandName == "RemoveSurvey") { arrQuestionID = new ArrayList(); arrQuestionID.AddRange(Request.Form["chQuestion"].ToString().Split(',')); BINROTA.BUS.Survey objSurvey = new BINROTA.BUS.Survey(); if (objSurvey.Delete(arrQuestionID)) { ToFinish("Seçtiðiniz Anketler Silinmiþtir"); } else { ToFinish("Hata!.. Seçtiðiniz Anketler SÝLÝNEMEDÝ"); } } } }