void LoadChargeDetails() { objCharge = new ChargeDetails(); dt = objCharge.SelectChargeDetails(); DataList1.DataSource = dt; DataList1.DataBind(); }
void LoadDeliveryType() { ChargeDetails cat = new ChargeDetails(); ddlDeliType.Items.Clear(); DataTable dt1 = cat.SelectChargeDetails(); ListItem listItem = new ListItem(); listItem.Text = "<Select Charge Type>"; listItem.Value = "0"; //listItem.Attributes.Add("style", "background-Black:white;color:White"); ddlDeliType.Items.Add(listItem); for (int i = 0; i < dt1.Rows.Count; i++) { listItem = new ListItem(); listItem.Text = dt1.Rows[i]["ChargeName"].ToString(); listItem.Value = dt1.Rows[i]["ChargeId"].ToString(); //listItem.Attributes.Add("style", "background-color:Black;color:white"); ddlDeliType.Items.Add(listItem); } }