//public static List<Fp_Model.Sample_Group> GetAll(string url) //{ // List<Fp_Model.Sample_Group> List = Fp_DAL.DataWithFP.getdata<Fp_Model.Sample_Group>(url, Fp_Common.FpMethod.sample_groups, "", "SampleGroups"); // return List; //} public static Fp_Model.Sample_Group GetBy(Fp_Common.UnameAndPwd up, string name) { List<Fp_Model.Sample_Group> List = GetAll(up); Fp_Model.Sample_Group sample_Group = new Fp_Model.Sample_Group(); if (List!=null&&List.Count>0) { sample_Group = List.Where<Fp_Model.Sample_Group>(a => a.name == name).FirstOrDefault(); } return sample_Group; }
//public static List<Fp_Model.Sample_Group> GetAll(string url) //{ // List<Fp_Model.Sample_Group> List = Fp_DAL.DataWithFP.getdata<Fp_Model.Sample_Group>(url, Fp_Common.FpMethod.sample_groups, "", "SampleGroups"); // return List; //} public static Fp_Model.Sample_Group GetBy(Fp_Common.UnameAndPwd up, string name) { List <Fp_Model.Sample_Group> List = GetAll(up); Fp_Model.Sample_Group sample_Group = new Fp_Model.Sample_Group(); if (List != null && List.Count > 0) { sample_Group = List.Where <Fp_Model.Sample_Group>(a => a.name == name).FirstOrDefault(); } return(sample_Group); }