//Add By Ankush on 28/07/2016 For Check Duplicate or Note
        public string DuplicityProductSAPAgreementMasterCheck(ProductSAPAgreementMaster productSAPAgreement)
        {
            var mstr_returnmsg = "";

            if (!string.IsNullOrEmpty(productSAPAgreement.SAPagreementNo))
            {
                var dupes = _ProductSAPAgreementMaster.Table.Where(x => x.SAPagreementNo == productSAPAgreement.SAPagreementNo && x.Deactivate == "N").FirstOrDefault();
                if (dupes != null)
                {
                    mstr_returnmsg = productSAPAgreement.SAPagreementNo;
                }
            }

            if (!string.IsNullOrEmpty(productSAPAgreement.AuthorCode))
            {
                var dupes = _ProductSAPAgreementMaster.Table.Where(x => x.AuthorCode == productSAPAgreement.AuthorCode && x.Deactivate == "N").FirstOrDefault();
                if (dupes != null)
                {
                    mstr_returnmsg = productSAPAgreement.AuthorCode;
                }
            }

            return(mstr_returnmsg);
        }
 //Added by Saddam on 28/08/2017
 public void UpdateSapAggrement(ProductSAPAgreementMaster ProductSAPAgreement)
 {
     _ProductSAPAgreementMaster.Update(ProductSAPAgreement);
 }
 public ProductSAPAgreementMaster GetSapAgreementNumberById(ProductSAPAgreementMaster ProductSAPAgreement)
 {
     return(_ProductSAPAgreementMaster.Table.Where(x => x.Id == ProductSAPAgreement.Id && x.Deactivate == "N").FirstOrDefault());
 }
 public void InsertProductSAPAggreentDetails(ProductSAPAgreementMaster ProductSAPAgreementMaster)
 {
     _ProductSAPAgreementMaster.Insert(ProductSAPAgreementMaster);
 }