public static List <FormData> Domain(AppPressDemo a, GridClass.GridWithHiddenColumnAndTotalRowFieldClass GridWithHiddenColumnAndTotalRow) { var formDatas = GridWithHiddenColumnAndTotalRow.ReadFormDatas(a, @" Select ""demo.Lookup.PickValues"".Value as Animal, ""demo.formcontainerdata"".Count,Remark From ""demo.formcontainerdata"" Left Outer Join ""demo.Lookup.PickValues"" On ""demo.Lookup.PickValues"".id = ""demo.formcontainerdata"".Animal "); return(formDatas); }
public static void Calc(AppPressDemo a, GridClass.GridWithHiddenColumnAndTotalRowFieldClass GridWithHiddenColumnAndTotalRow) { // Create a total formData and add it to the grid. // This is done in Calc so that the totals of any calculated fields in grid are also done var totalFormData = new GridClass.GridWithHiddenColumnAndTotalRowRowClass(a); totalFormData.Animal.val = "<strong>Total</strong>"; var formDatas = GridWithHiddenColumnAndTotalRow.val; totalFormData.Count.val = formDatas.Sum(t => ((GridClass.GridWithHiddenColumnAndTotalRowRowClass)t).Count.val); formDatas.Insert(0, totalFormData); GridWithHiddenColumnAndTotalRow.val = formDatas; }