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;
        }
        public int SaveForm27C(Form27CDTO form27CDetails)
        {
            form27c form27CEntity = new form27c();
            form27c_history form27C_historyEntity = new form27c_history();
            using (TransactionScope transactionScope = new TransactionScope())
            {
                AutoMapper.Mapper.Map(form27CDetails, form27CEntity);
                if (form27CDetails.Form27C_Id == 0)
                {
                    ESalesUnityContainer.Container.Resolve<IGenericRepository<form27c>>().Save(form27CEntity);
                }

                AutoMapper.Mapper.Map(form27CDetails, form27C_historyEntity);
                if (form27CDetails.Form27C_Id == 0)
                {
                    ESalesUnityContainer.Container.Resolve<IGenericRepository<form27c_history>>().Save(form27C_historyEntity);
                }
                transactionScope.Complete();
            }
            return form27CEntity.Form27C_Id;
        }