Ejemplo n.º 1
0
 protected void RepDetails_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Footer)
     {
         string msg = "Assignment date should be less than end date!";
         txtenddateF.Attributes.Add("onchange", "return comparedate('" + txtassignmentdateF.ClientID + "','" + txtenddateF.ClientID + "','" + msg + "');");
         txtassignmentdateF.Attributes.Add("onchange", "return comparedate('" + txtassignmentdateF.ClientID + "','" + txtenddateF.ClientID + "','" + msg + "');");
         MasterData objmas = new MasterData();
         try
         {
             DataTable dt = objmas.Getshows("0");
             objcf.FillDropDownList(ddlshownameF, dt, "show_name", "show_id");
         }
         catch (Exception ex)
         {
             lblerrmsg.Text = "Error: " + ex.Message;
         }
     }
 }
Ejemplo n.º 2
0
 public void LoadPreferenceShows()
 {
     objmst = new MasterData();
     dt = new DataTable();
     dt = objmst.Getshows("0");
     DataColumn dc = new DataColumn("Show_pro_preference", typeof(string));
     dc.DefaultValue = "";
     dt.Columns.Add(dc);
     repbind.DataSource = dt;
     repbind.DataBind();
 }
Ejemplo n.º 3
0
 protected void RepDetails_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName.ToLower() == "edit")
     {
         e.Item.FindControl("tredit").Visible = true;
         e.Item.FindControl("trcrow").Visible = false;
         MasterData objmas = new MasterData();
         DataTable dt = objmas.Getshows("Y");
         DropDownList ddlshownameE = (DropDownList)e.Item.FindControl("ddlshownameE");
         HiddenField hdnshowid = (HiddenField)e.Item.FindControl("hdnshowid");
         objcf.FillDropDownList(ddlshownameE, dt, "show_name", "show_id");
         ddlshownameE.SelectedIndex = ddlshownameE.Items.IndexOf(ddlshownameE.Items.FindByValue(hdnshowid.Value));
     }
     if (e.CommandName.ToLower() == "cancel")
     {
         BindShow();
     }
     if (e.CommandName.ToLower() == "update")
     {
         UpdateShowDetails(e.Item);
         BindShow();
     }
     trfooter.Visible = false;
 }