Hello Sir,
I don't know what to do.
Here, how can i add list of 'Cids' each value in viewmodel class. In this situation, I can not use List in class because the class using other areas without using List?
Here, how can i add list of 'Cids' each value in viewmodel class. In this situation, I can not use List in class because the class using other areas without using List?
Please have a look at the attached file.
string clientIds = "";
ViewModel.ClientContract clientContract = new ViewModel.ClientContract();
foreach (var item in frm.AllKeys){
if (item.Contains("cb_"))
{
Mapper.CreateMap
var ids = item.Split(new[] { "cb_" }, StringSplitOptions.RemoveEmptyEntries);
// clientContract.ProductDetailsId = Convert.ToInt32(ids[0]);
clientContract.ManageClientDetailsId = manageproduct[0].Id;
clientIds = clientIds + Convert.ToInt32(ids[0]) + ',';
}
}
var Cids = clientIds.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var id in Cids)
{
clientContract.ProductDetailsId = Convert.ToInt32(id); /*Here, how can i add list of 'Cids' each value in viewmodel class. In this situation, I can not use List in class because the class using other areas without using List?*/
}
service.clientContract = Mapper.Map
service.AddClientContract();

Ehsan SajjadPosted Jun 23, 2016, 3:21 PM