Ejemplo n.º 1
0
        public IHttpActionResult GetDepartmentsByBranchCode(string branch_code)
        {
            var depts_ = new List <DepartmentModel>();

            if (branch_code.Equals("001"))
            {
                AppraisalDbEntities appcnxn = new AppraisalDbEntities();
                depts_ = (from a in appcnxn.zib_appraisal_dept_structure
                          where a.groupcode.Equals("001")
                          orderby a.deptname ascending
                          select new DepartmentModel
                {
                    dept_code = a.deptcode,
                    dept_name = a.deptname,
                    unit_code = a.unitcode,
                    unit_name = a.unitname
                }).ToList();
                return(Ok(depts_));
            }
            depts_.Add(new DepartmentModel {
                Id = 0, dept_code = "OPNS", dept_name = "OPERATIONS", unit_code = "OPNS", unit_name = "OPERATIONS"
            });
            depts_.Add(new DepartmentModel {
                Id = 1, dept_code = "MKTG", dept_name = "MARKETING", unit_code = "OPNS", unit_name = "OPERATIONS"
            });
            return(Ok(depts_));
        }
Ejemplo n.º 2
0
        internal static zib_workflow_xceed_definitions getXceedDefinition(StaffADProfile staffADProfile)
        {
            AppraisalDbEntities conn = new AppraisalDbEntities();
            var entry = (from d in conn.zib_workflow_xceed_definitions
                         where (d.ad_org_id.Equals(staffADProfile.org_id))
                         select d
                         ).First();

            return(entry);
        }
Ejemplo n.º 3
0
        internal static Tuple <int, string, int> getXceedConnector(StaffADProfile staffADProfile)
        {
            AppraisalDbEntities conn = new AppraisalDbEntities();
            var entry = (from d in conn.zib_workflow_xceed_definitions
                         where (d.ad_org_id.Equals(staffADProfile.org_id))
                         select new
            {
                conn_name = d.conn_name,
                org_id = d.org_id,
                ad_org_id = d.ad_org_id
            }).First();
            string connString = System.Configuration.ConfigurationManager.ConnectionStrings[entry.conn_name].ConnectionString;

            return(Tuple.Create(entry.org_id, connString, entry.ad_org_id));
        }
Ejemplo n.º 4
0
 static public List <CustomerSearchEntryModel> getSearchRequestEntry(string workflowid)
 {
     try
     {
         AppraisalDbEntities workflowcnxn = new AppraisalDbEntities();
         var entries = (from w in workflowcnxn.zib_customersearch_entries
                        where w.workflowid.Equals(workflowid)
                        select new CustomerSearchEntryModel
         {
             StaffName = w.name,
             AccountNumber = w.account_no,
             AccountName = w.account_name,
             RegistrationNumber = w.registration_no,
             StaffNumber = w.employee_number,
             RequestStageId = w.requeststageid,
             RequestStage = w.requeststage,
             DateSubmitted = w.createdate,
             LastEditDate = w.lasteditdate,
             RequestStatus = w.status,
             EmailAddress = w.email,
             EmployeeNumber = w.employee_number,
             StaffGrade = w.grade,
             org_id = w.org_id,
             Ranking = w.ranking,
             Phone = w.phone,
             ad_org_id = w.ad_org_id,
             supergroupcode = w.supergroupcode,
             supergroupname = w.supergroupname,
             GroupName = w.groupname,
             GroupCode = w.groupcode,
             DeptCode = w.deptcode,
             DeptName = w.deptname,
             UnitName = w.unitname,
             UnitCode = w.unitcode,
             FeeAmount = w.feeAmount,
             Comments = w.comments,
             EntryPoint = w.entrypoint,
         }).ToList();
         return(entries);
     }
     catch (Exception ex) {
         return(null);
     }
     return(null);
 }