public string GenerateTowerAddFlat(int TotalFloor, List <int> FlatNo, List <bool> PreIncrement, string[] PLCIDs, int TowerID, string FltType, string FltTSize) { int i = 0; //foreach (int flat in FlatNo) //{ List <PLCModel> pmodel = new List <PLCModel>(); PLCModel pm = new PLCModel(); foreach (string s in PLCIDs) { if (s != null && s != "") { pmodel.Add(new PLCModel { PLCID = Convert.ToInt32(s), PLCName = s }); } } int ss = fservice.AddFlats(TotalFloor, 0, FlatNo, PreIncrement, pmodel, User.Identity.Name, TowerID, FltType, FltTSize); i++; // } return("1"); }