public Form27C_HistoryDTO GetForm27CHistoryDetailsByCustId(int CustId)
        {
            Form27C_HistoryDTO Form27CHistoryDetails = new Form27C_HistoryDTO();
            AutoMapper.Mapper.Map(ESalesUnityContainer.Container.Resolve<IGenericRepository<form27c_history>>()
                .GetSingle(item => item.Cust_Id == CustId), Form27CHistoryDetails);

            return Form27CHistoryDetails;
        }
 public int SaveForm27CHistory(Form27C_HistoryDTO form27CHistoryDetails)
 {
     form27c_history form27CHistoryEntity = new form27c_history();
     using (TransactionScope transactionScope = new TransactionScope())
     {
         AutoMapper.Mapper.Map(form27CHistoryDetails, form27CHistoryEntity);
         if (form27CHistoryDetails.Form27c_History_Id == 0)
         {
             ESalesUnityContainer.Container.Resolve<IGenericRepository<form27c_history>>().Save(form27CHistoryEntity);
         }
         transactionScope.Complete();
     }
     return form27CHistoryEntity.Form27c_History_Id;
 }