protected void RepeaterRequests_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName.CompareTo("RequestReject") == 0) { TextBox text = e.Item.FindControl("TextBoxRequestText") as TextBox; //reject CreditRequestAction cra = new CreditRequestAction(); cra.requestAction(Convert.ToInt32(e.CommandArgument.ToString()), 2, text.Text); RepeaterRequests.DataBind(); } if (e.CommandName.CompareTo("RequestVerify") == 0) { TextBox text = e.Item.FindControl("TextBoxRequestText") as TextBox; TextBox credit = e.Item.FindControl("TextBoxRequestVerifiedCredit") as TextBox; Label userid = e.Item.FindControl("LabelRequstUserId") as Label; Label type = e.Item.FindControl("LabelRequestType") as Label; int typeCode = 0; if (type.Text == "1") { typeCode = 3; } else { typeCode = 4; } //verify CreditRequestAction cra = new CreditRequestAction(); cra.requestAction(Convert.ToInt32(e.CommandArgument.ToString()), 1, text.Text); RepeaterRequests.DataBind(); //add credit CreditAdd ca = new CreditAdd(); ca.addCredit(Convert.ToInt32(userid.Text), typeCode, Convert.ToInt32(credit.Text), Convert.ToInt32(Session["UserId"]), text.Text); } }