Example #1
0
        public bool Insert(int OrganizationId, string DepartmentName, string DepartmentDescription, string Phone1, string Phone2, string Fax1, string Fax2, string AddressLine1, string AddressLine2)
        {
            DepartmentsDAC departmentsComponent = new DepartmentsDAC();
            int            DepartmentId         = 0;

            return(departmentsComponent.InsertNewDepartments(ref DepartmentId, OrganizationId, DepartmentName, DepartmentDescription, Phone1, Phone2, Fax1, Fax2, AddressLine1, AddressLine2));
        }
Example #2
0
        public bool Insert(Departments departments)
        {
            int            autonumber           = 0;
            DepartmentsDAC departmentsComponent = new DepartmentsDAC();
            bool           endedSuccessfuly     = departmentsComponent.InsertNewDepartments(ref autonumber, departments.OrganizationId, departments.DepartmentName, departments.DepartmentDescription, departments.Phone1, departments.Phone2, departments.Fax1, departments.Fax2, departments.AddressLine1, departments.AddressLine2);

            if (endedSuccessfuly)
            {
                departments.DepartmentId = autonumber;
            }
            return(endedSuccessfuly);
        }