Example #1
0
        public int insertVendor(Organization org, CompanyDetails company, BranchLocation location)
        {
            int  OrganizationID   = 0;
            int  CompanyDetailsID = 0;
            int  LocationID       = 0;
            bool insertResult     = false;

            try
            {
                OrganizationHelper organizationhelper = new OrganizationHelper();
                OrganizationID = organizationhelper.insertupdateOrganizationHier(org, 'I');
                if (OrganizationID > 0)
                {
                    company.Org_Hier_ID  = OrganizationID;
                    CompanyDetailsID     = organizationhelper.insertupdateCompanyDetails(company, 'I');
                    location.Org_Hier_ID = OrganizationID;
                    LocationID           = organizationhelper.insertupdateBranchLocation(location, 'I');
                }

                if (OrganizationID > 0 && CompanyDetailsID > 0)

                {
                    insertResult = true;
                }
            }
            catch
            {
                throw;
            }
            return(OrganizationID);
        }
Example #2
0
        public int insertBranch(Organization org, BranchLocation branch)
        {
            int  OrganizationID   = 0;
            int  BranchLocationID = 0;
            bool insertResult     = false;

            try
            {
                OrganizationHelper organizationhelper = new OrganizationHelper();
                OrganizationID = organizationhelper.insertupdateOrganizationHier(org, 'I');

                if (OrganizationID > 0)
                {
                    branch.Org_Hier_ID = OrganizationID;
                    BranchLocationID   = organizationhelper.insertupdateBranchLocation(branch, 'I');
                }
                if (BranchLocationID != 0 && OrganizationID != 0)
                {
                    insertResult = true;
                }
            }
            catch
            {
                throw;
            }
            return(OrganizationID);
        }
Example #3
0
        public bool updateBranch(Organization org, BranchLocation branch)
        {
            int  OrganizationID = 0;
            int  BranchID       = 0;
            bool updateResult   = false;

            try
            {
                OrganizationHelper organizationhelper = new OrganizationHelper();
                OrganizationID = organizationhelper.insertupdateOrganizationHier(org, 'U');

                BranchID = organizationhelper.insertupdateBranchLocation(branch, 'U');
                {
                    updateResult = true;
                }
            }
            catch
            {
                throw;
            }
            return(updateResult);
        }
Example #4
0
        public int insertCompany(Organization org, CompanyDetails company, BranchLocation branch)
        {
            int  OrganizationID   = 0;
            int  BranchLocationID = 0;
            int  CompanyDetailsID = 0;
            int  IndustryTypeID   = 0;
            bool insertResult     = false;

            try
            {
                OrganizationHelper organizationhelper = new OrganizationHelper();
                OrganizationID = organizationhelper.insertupdateOrganizationHier(org, 'I');


                if (OrganizationID > 0)
                {
                    branch.Org_Hier_ID = OrganizationID;
                    BranchLocationID   = organizationhelper.insertupdateBranchLocation(branch, 'I');

                    if (OrganizationID > 0)
                    {
                        company.Org_Hier_ID = OrganizationID;
                        CompanyDetailsID    = organizationhelper.insertupdateCompanyDetails(company, 'I');
                    }
                }
                if (BranchLocationID > 0 && OrganizationID > 0 && CompanyDetailsID > 0)

                {
                    insertResult = true;
                }
            }
            catch
            {
                throw;
            }
            return(OrganizationID);
        }
Example #5
0
        public bool updateCompany(Organization org, CompanyDetails company, BranchLocation branch)
        {
            int  insertOrganizationID   = 0;
            int  inserBranchID          = 0;
            int  insertCompanyDetailsID = 0;
            bool updateResult           = false;

            try
            {
                OrganizationHelper organizationhelper = new OrganizationHelper();
                insertOrganizationID = organizationhelper.insertupdateOrganizationHier(org, 'U');

                inserBranchID          = organizationhelper.insertupdateBranchLocation(branch, 'U');
                insertCompanyDetailsID = organizationhelper.insertupdateCompanyDetails(company, 'U');
                {
                    updateResult = true;
                }
            }
            catch
            {
                throw;
            }
            return(updateResult);
        }