Exemplo n.º 1
0
        public DataContracts.DC_Message AddStaticDataMappingAttribute(DataContracts.UploadStaticData.DC_SupplierImportAttributes obj)
        {
            DataContracts.DC_Message dc        = new DataContracts.DC_Message();
            Guid   _SupplierImportAttribute_Id = obj.SupplierImportAttribute_Id;
            Guid   _Supplier_Id = obj.Supplier_Id;
            string For          = obj.For;
            bool   toAdd        = true;

            if (string.IsNullOrWhiteSpace(For))
            {
                if (_Supplier_Id == Guid.Empty)
                {
                    toAdd            = false;
                    dc.StatusCode    = DataContracts.ReadOnlyMessage.StatusCode.Failed;
                    dc.StatusMessage = "Supplier Id not passed";
                }
            }
            if (toAdd)
            {
                using (DataLayer.DL_UploadStaticData objBL = new DataLayer.DL_UploadStaticData())
                {
                    dc = objBL.AddStaticDataMappingAttribute(obj);
                }
            }
            return(dc);
        }