private void SaveInsightSupplierContactDistributionModel(int insightSupplierContactId) { InsightSupplierContactDistributionModel.DeleteInsightSupplierContactDistributionModelByInsightSupplierContactId(this.insightSupplierId, insightSupplierContactId); foreach (ListItem listItem in CheckBoxListModel.Items) { if (listItem.Selected) { InsightSupplierContactDistributionModel iscdM = new InsightSupplierContactDistributionModel(); iscdM.InsightSupplierId = this.insightSupplierId; iscdM.InsightSupplierContactId = insightSupplierContactId; iscdM.ModelId = Convert.ToInt32(listItem.Value); iscdM.ModifiedUser = Context.User.Identity.GetUserName(); iscdM.Save(); } } }