private IList <PlannedBill> ConvertTransformerToPlannedBill(List <Transformer> transformerList) { if (transformerList == null || transformerList.Count == 0) { return(null); } IList <PlannedBill> plannedBillList = new List <PlannedBill>(); foreach (Transformer transformer in transformerList) { PlannedBill plannedBill = ThePlannedBillMgr.LoadPlannedBill(transformer.Id); plannedBill.CurrentActingQty = transformer.CurrentQty; plannedBillList.Add(plannedBill); } return(plannedBillList); }
public IList <PlannedBill> PopulateSelectedData() { if (this.GV_List.Rows != null && this.GV_List.Rows.Count > 0) { IList <PlannedBill> plannedBillList = new List <PlannedBill>(); foreach (GridViewRow row in this.GV_List.Rows) { CheckBox checkBoxGroup = row.FindControl("CheckBoxGroup") as CheckBox; if (checkBoxGroup.Checked) { HiddenField hfId = row.FindControl("hfId") as HiddenField; TextBox tbCurrentActingQty = row.FindControl("tbCurrentActingQty") as TextBox; PlannedBill plannedBill = ThePlannedBillMgr.LoadPlannedBill(int.Parse(hfId.Value)); plannedBill.CurrentActingQty = tbCurrentActingQty.Text.Trim() == string.Empty ? 0 : decimal.Parse(tbCurrentActingQty.Text.Trim()); plannedBillList.Add(plannedBill); } } return(plannedBillList); } return(null); }