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;
 }
        public int UpdateForm27C(Form27CDTO Form27CDetails)
        {
            form27c form27cEntity = new form27c();
            form27c_history form27chistoryEntity = new form27c_history();
            int form27cid;
            using (TransactionScope transactionScope = new TransactionScope())
            {
                AutoMapper.Mapper.Map(Form27CDetails, form27cEntity);
                ESalesUnityContainer.Container.Resolve<IGenericRepository<form27c>>().Update(form27cEntity);
                form27cid = Form27CDetails.Form27C_Id;

                //Form27CDetails.Form27C_Id = 0;
                //AutoMapper.Mapper.Map(Form27CDetails, form27chistoryEntity);
                //ESalesUnityContainer.Container.Resolve<IGenericRepository<form27c_history>>().Save(form27chistoryEntity);
                transactionScope.Complete();
            }
            return form27cid;
        }