示例#1
0
        public virtual List <BasicDbEntity> Deparments(string countryId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_country", countryId));
            return(DataAccess.Execute <BasicDbEntity>("pkg_address_data.get_departments", parameters));
        }
示例#2
0
        public virtual List <Branch> Branches(string companyId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            return(DataAccess.ExecuteFunction <Branch>("security.branches", parameters, BranchDataMapper.Class));
        }
示例#3
0
        public Supervisor GetSupervisor(string companyId, string branchId)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("COMPANY", companyId));
            parameter.Add(O7Parameter.Make("BRANCH", branchId));
            return(DataAccess.ExecuteFunction <Supervisor>("SUPPORT.GET_SUPERVISOR", parameter, SupervisorDataMapper.Class).FirstOrDefault());
        }
示例#4
0
        public virtual string UserName(string companyId, string branchId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            parameters.Add(O7Parameter.Make("p_branch", branchId));
            return(DataAccess.ExecuteFunction <string>("security.get_user_name", parameters));
        }
示例#5
0
        public List <Period> ListPeriods(string companyId, string branchId)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("COMPANY", companyId));
            parameter.Add(O7Parameter.Make("BRANCH", branchId));
            return(DataAccess.ExecuteFunction <Period>("ADVISORY_PERIOD.LIST_PERIODS", parameter, PeriodDataMapper.Class));
        }
示例#6
0
        public virtual List <O7Module> AllModules(string companyId, string branchId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            parameters.Add(O7Parameter.Make("p_branch", branchId));
            return(DataAccess.ExecuteFunction <O7Module>("security.modules_installed", parameters, ModuleDataMapper.Class));
        }
示例#7
0
        public List <CentroCosto> GetCentroCostos(string companyId, string branchId)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("p_company", companyId));
            parameter.Add(O7Parameter.Make("p_branch", branchId));
            return(DataAccess.ExecuteFunction <CentroCosto>("common_function.list_cost_center", parameter, CentroCostoDataMapper.Class));
        }
示例#8
0
        public virtual List <BasicDbEntity> Countries(string companyId, string branchId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            parameters.Add(O7Parameter.Make("p_branch", branchId));
            return(DataAccess.Execute <BasicDbEntity>("pkg_address_data.get_countries", parameters));
        }
示例#9
0
        public List <Year> ListAvalibleYears(string companyId, string branchId)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("p_company", companyId));
            parameter.Add(O7Parameter.Make("p_branch", branchId));
            return(DataAccess.ExecuteFunction <Year>("ADVISORY_PERIOD.list_avalible_year", parameter, PeriodStateDataMapper.Class));
        }
示例#10
0
        public virtual List <Menu> Menus(string companyId, string branchId, string menuId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            parameters.Add(O7Parameter.Make("p_branch", branchId));
            parameters.Add(O7Parameter.Make("p_modulo", menuId));
            return(DataAccess.ExecuteFunction <Menu>("security.menus", parameters, MenuDataMapper.Class));
        }
示例#11
0
        public virtual string ValidAccess(string companyId, string branchId, string menuId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            parameters.Add(O7Parameter.Make("p_branch", branchId));
            parameters.Add(O7Parameter.Make("p_menu_id", menuId));
            return(DataAccess.ExecuteFunction <string>("security.is_permited", parameters));
        }
示例#12
0
        public virtual bool ClientChangeState(string companyId, string branchId, string clientId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            parameters.Add(O7Parameter.Make("p_branch", branchId));
            parameters.Add(O7Parameter.Make("p_client_id", clientId));
            return(DataAccess.ExecuteFunction <int>("pkg_client_managment.change_state_client", parameters) == 1);
        }
示例#13
0
        public virtual IEnumerable <ClientDbEntity> Clients(string companyId, string branchId, string filter)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            parameters.Add(O7Parameter.Make("p_branch", branchId));
            parameters.Add(O7Parameter.Make("p_filter", filter));
            return(DataAccess.Execute <ClientDbEntity>("pkg_client_managment.get_clients", parameters));
        }
示例#14
0
        public virtual ClientDetailDbEntity Client(string companyId, string branchId, string clientId)
        {
            var parameters = O7DbParameterCollection.Make;

            parameters.Add(O7Parameter.Make("p_company", companyId));
            parameters.Add(O7Parameter.Make("p_branch", branchId));
            parameters.Add(O7Parameter.Make("p_client_id", clientId));
            return(DataAccess.Execute <ClientDetailDbEntity>("pkg_client_managment.get_client", parameters)[0]);
        }
示例#15
0
        public bool ActivateYear(string companyId, string branchId, string periodId)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("COMPANY", companyId));
            parameter.Add(O7Parameter.Make("BRANCH", branchId));
            parameter.Add(O7Parameter.Make("YEAR", periodId));
            return(DataAccess.ExecuteFunction <int>("ADVISORY_PERIOD.ACTIVATE_YEAR", parameter) != 0);
        }
示例#16
0
        public bool ClosePeriod(string companyId, string branchId, string periodId)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("p_company", companyId));
            parameter.Add(O7Parameter.Make("p_branch", branchId));
            parameter.Add(O7Parameter.Make("p_period_id", periodId));
            return(DataAccess.ExecuteFunction <int>("ADVISORY_PERIOD.close_period", parameter) != 0);
        }
示例#17
0
        public bool ValidPeriod(string companyId, string branchId, string month, string year)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("p_company", companyId));
            parameter.Add(O7Parameter.Make("p_branch", branchId));
            parameter.Add(O7Parameter.Make("p_month", month));
            parameter.Add(O7Parameter.Make("p_year", year));
            return(DataAccess.ExecuteFunction <int>("ADVISORY_PERIOD.valid_period_id", parameter) > 0);
        }
示例#18
0
        public List <Activity> ListActivities(string companyId, string branchId, string startDate, string endDate)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("p_company", companyId));
            parameter.Add(O7Parameter.Make("p_branch", branchId));
            parameter.Add(O7Parameter.Make("p_start_date", startDate));
            parameter.Add(O7Parameter.Make("p_end_date", endDate));
            return(DataAccess.ExecuteFunction <Activity>("advisory_activity.list_activities", parameter, ActivityDataMapper.Class));
        }
示例#19
0
        public bool InsertActivity(string companyId, string branchId, string centerCostId, string periodId, string activityStart, string activityDescription)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("p_company", companyId));
            parameter.Add(O7Parameter.Make("p_branch", branchId));
            parameter.Add(O7Parameter.Make("p_cost_center", centerCostId));
            parameter.Add(O7Parameter.Make("p_period_id", periodId));
            parameter.Add(O7Parameter.Make("p_activity_start", activityStart));
            parameter.Add(O7Parameter.Make("p_description", activityDescription));
            return(DataAccess.ExecuteFunction <int>("advisory_activity.insert_activity", parameter) != 0);
        }
示例#20
0
        public List <ActivityReport> ListActivityReports(string companyId, string branchId, string workerId, string workerName,
                                                         string workerLastName, string workerSecondLastName, string costCenterId, string startActivity, string endActivity)
        {
            var parameter = O7DbParameterCollection.Make;

            parameter.Add(O7Parameter.Make("p_company", companyId));
            parameter.Add(O7Parameter.Make("p_branch", branchId));
            parameter.Add(O7Parameter.Make("p_worker_id", workerId));
            parameter.Add(O7Parameter.Make("p_worker_name", workerName));
            parameter.Add(O7Parameter.Make("p_worker_last_name", workerLastName));
            parameter.Add(O7Parameter.Make("p_worker_second_last_name", workerSecondLastName));
            parameter.Add(O7Parameter.Make("p_cost_center_id", costCenterId));
            parameter.Add(O7Parameter.Make("p_start_date", startActivity));
            parameter.Add(O7Parameter.Make("p_end_date", endActivity));
            return(DataAccess.ExecuteFunction <ActivityReport>("advisory_activity.list_activities_by_worker", parameter, ActivityReportDataMapper.Class));
        }