//protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) //{ // if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) // { // DropDownList CboEventi = e.Item.FindControl("CboEventi") as DropDownList; // PopolaCboEventi(CboEventi); // DropDownList CboCase = e.Item.FindControl("CboCase") as DropDownList; // PopolaCboCase(CboCase); // DropDownList CboLandlord = e.Item.FindControl("CboLandlord") as DropDownList; // PopolaCboLandlord(CboLandlord); // DropDownList CboParty = e.Item.FindControl("CboParty") as DropDownList; // PopolaCboParty(CboParty); // Ls.Prj.DTO.EventoDTO drv = (Ls.Prj.DTO.EventoDTO)e.Item.DataItem; // CboCase.Attributes.Add("onchange", "UpdateHouse(this)"); // CboEventi.Attributes.Add("onchange", "UpdateEvtType(this)"); // CboLandlord.Attributes.Add("onchange", "UpdateLandlord(this)"); // CboParty.Attributes.Add("onchange", "UpdateParty(this)"); // //DataRowView drv = e.Row.DataItem as DataRowView; // Utility.SetDropByValue(CboEventi, CboEventi.Attributes["MemId"]); // Utility.SetDropByValue(CboCase, CboCase.Attributes["MemId"]); // Utility.SetDropByValue(CboLandlord, CboLandlord.Attributes["MemId"]); // Utility.SetDropByValue(CboParty, CboParty.Attributes["MemId"]); // if (CboEventi.Attributes["MemId"] == "0") // { // CboEventi.Attributes.Add("style", "font-weight:bold"); // } // if (CboCase.Attributes["MemId"] == "0") // { // CboCase.Attributes.Add("style", "font-weight:bold"); // } // if (CboLandlord.Attributes["MemId"] == "0") // { // CboLandlord.Attributes.Add("style", "font-weight:bold"); // } // if (CboParty.Attributes["MemId"] == "0") // { // CboParty.Attributes.Add("style", "font-weight:bold"); // } // //colora di verde o rosso l'importo a seconda che sia un credito o debito // //Label LblAmount = e.Item.FindControl("LblAmount") as Label; // //if (LblAmount.Text.Contains("(")) // //{ // // LblAmount.ForeColor = System.Drawing.Color.Red; // //} // //else // //{ // // LblAmount.ForeColor = System.Drawing.Color.Green; // //} // } //} protected void RptSelEvt_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DropDownList CboEventi = e.Item.FindControl("CboEventi") as DropDownList; PopolaCboEventi(CboEventi); DropDownList CboCase = e.Item.FindControl("CboCase") as DropDownList; PopolaCboCase(CboCase); DropDownList CboLandlord = e.Item.FindControl("CboLandlord") as DropDownList; PopolaCboLandlord(CboLandlord); DropDownList CboParty = e.Item.FindControl("CboParty") as DropDownList; PopolaCboParty(CboParty); Ls.Prj.DTO.EventoDTO drv = (Ls.Prj.DTO.EventoDTO)e.Item.DataItem; CboCase.Attributes.Add("onchange", "UpdateHouse(this)"); CboEventi.Attributes.Add("onchange", "UpdateEvtType(this)"); CboLandlord.Attributes.Add("onchange", "UpdateLandlord(this)"); CboParty.Attributes.Add("onchange", "UpdateParty(this)"); //DataRowView drv = e.Row.DataItem as DataRowView; Utility.SetDropByValue(CboEventi, CboEventi.Attributes["MemId"]); Utility.SetDropByValue(CboCase, CboCase.Attributes["MemId"]); Utility.SetDropByValue(CboLandlord, CboLandlord.Attributes["MemId"]); Utility.SetDropByValue(CboParty, CboParty.Attributes["MemId"]); if (CboEventi.Attributes["MemId"] == "0") { CboEventi.Attributes.Add("style", "font-weight:bold"); } if (CboCase.Attributes["MemId"] == "0") { CboCase.Attributes.Add("style", "font-weight:bold"); } if (CboLandlord.Attributes["MemId"] == "0") { CboLandlord.Attributes.Add("style", "font-weight:bold"); } if (CboParty.Attributes["MemId"] == "0") { CboParty.Attributes.Add("style", "font-weight:bold"); } ////colora di verde o rosso l'importo a seconda che sia un credito o debito //Label LblAmount = e.Item.FindControl("LblAmount") as Label; //if (LblAmount.Text.Contains("(")) //{ // LblAmount.ForeColor = System.Drawing.Color.Red; //} //else //{ // LblAmount.ForeColor = System.Drawing.Color.Green; //} //CboEventi.Enabled = false; //CboCase.Enabled = false; } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DropDownList CboEventi = e.Item.FindControl("CboEventi") as DropDownList; PopolaCboEventi(CboEventi); DropDownList CboCase = e.Item.FindControl("CboCase") as DropDownList; PopolaCboCase(CboCase); Ls.Prj.DTO.EventoDTO drv = (Ls.Prj.DTO.EventoDTO)e.Item.DataItem; CboCase.Attributes.Add("onchange", "UpdateHouse(this)"); CboEventi.Attributes.Add("onchange", "UpdateEvtType(this)"); //DataRowView drv = e.Row.DataItem as DataRowView; Utility.SetDropByValue(CboEventi, CboEventi.Attributes["MemId"]); Utility.SetDropByValue(CboCase, CboCase.Attributes["MemId"]); if (CboEventi.Attributes["MemId"] == "0") { CboEventi.Attributes.Add("style", "font-weight:bold"); } if (CboCase.Attributes["MemId"] == "0") { CboCase.Attributes.Add("style", "font-weight:bold"); } } }
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DropDownList CboEventi = e.Item.FindControl("CboEventi") as DropDownList; PopolaCboEventi(CboEventi); DropDownList CboCase = e.Item.FindControl("CboCase") as DropDownList; PopolaCboCase(CboCase); DropDownList CboLandlord = e.Item.FindControl("CboLandlord") as DropDownList; PopolaCboLandlord(CboLandlord); DropDownList CboParty = e.Item.FindControl("CboParty") as DropDownList; PopolaCboParty(CboParty); //TextBox TxtDescription2 = e.Item.FindControl("TxtDescription2") as TextBox; HyperLink HypLnkUpdDesc2 = e.Item.FindControl("HypLnkUpdDesc2") as HyperLink; //HypLnkUpdDesc2.NavigateUrl = "javascript:UpdateDesc2(this)"; HypLnkUpdDesc2.Attributes.Add("onclick", "UpdateDesc2(this)"); HyperLink HypProc = e.Item.FindControl("HypProc") as HyperLink; HypProc.Attributes.Add("onclick", "UpdateProc(this)"); Ls.Prj.DTO.EventoDTO drv = (Ls.Prj.DTO.EventoDTO)e.Item.DataItem; if (drv.processed) { HypProc.Text = "Unproc"; } else { HypProc.Text = "Proc"; } CboCase.Attributes.Add("onchange", "UpdateHouse(this)"); CboEventi.Attributes.Add("onchange", "UpdateEvtType(this)"); CboLandlord.Attributes.Add("onchange", "UpdateLandlord(this)"); CboParty.Attributes.Add("onchange", "UpdateParty(this)"); //DataRowView drv = e.Row.DataItem as DataRowView; Utility.SetDropByValue(CboEventi, CboEventi.Attributes["MemId"]); Utility.SetDropByValue(CboCase, CboCase.Attributes["MemId"]); Utility.SetDropByValue(CboLandlord, CboLandlord.Attributes["MemId"]); Utility.SetDropByValue(CboParty, CboParty.Attributes["MemId"]); if (CboEventi.Attributes["MemId"] == "0") { CboEventi.Attributes.Add("style", "font-weight:bold;background-color:yellow"); //CboEventi.Attributes.Add("style", "background-color:yellow"); } if (CboCase.Attributes["MemId"] == "0") { CboCase.Attributes.Add("style", "font-weight:bold;background-color:yellow"); //CboCase.Attributes.Add("style", "background-color:yellow"); } if (CboLandlord.Attributes["MemId"] == "0") { CboLandlord.Attributes.Add("style", "font-weight:bold;background-color:yellow"); //CboLandlord.Attributes.Add("style", "background-color:yellow"); } if (CboParty.Attributes["MemId"] == "0") { CboParty.Attributes.Add("style", "font-weight:bold;background-color:yellow"); //CboParty.Attributes.Add("style", "background-color:yellow"); } //colora di verde o rosso l'importo a seconda che sia un credito o debito Label LblAmount = e.Item.FindControl("LblAmount") as Label; if (LblAmount.Text.Contains("(")) { LblAmount.ForeColor = System.Drawing.Color.Red; } else { LblAmount.ForeColor = System.Drawing.Color.Green; } } }