//  private DataColumn[] discrepancyItemListColumn;
 public IssueAdjustmentVoucherControl()
 {
     currentEmployee = Util.ValidateUser(Constants.EMPLOYEE_ROLE.STORE_SUPERVISOR);
     InventoryEntities inventoryEntities = new InventoryEntities();
     employeeBroker = new EmployeeBroker(inventoryEntities);
     discrepancyBroker = new DiscrepancyBroker(inventoryEntities);
     itemBroker = new ItemBroker(inventoryEntities);
     // discrepancyList = new System.Data.Objects.DataClasses.EntityCollection<Discrepancy>();
     listColumn = new DataColumn[]{new DataColumn(listColumnName[0]),new DataColumn(listColumnName[1]),new DataColumn(listColumnName[2]),new DataColumn(listColumnName[3])
     };
     detailColumn = new DataColumn[] { new DataColumn(detailColumnName[0]), new DataColumn(detailColumnName[1]), new DataColumn(detailColumnName[2]), new DataColumn(detailColumnName[3]), new DataColumn(detailColumnName[4]) };
 }
コード例 #2
0
        public static DataTable GetEmployeesByDepartments()
        {
            InventoryEntities inventory = new InventoryEntities();

            IEmployeeBroker employeeBroker = new EmployeeBroker(inventory);
            List<Employee> lEmployee = employeeBroker.GetEmployeeByDepartments(Util.GetEmployee());
            DataTable dtEmployee = new DataTable();
            dtEmployee.Columns.Add("employeeID");
            dtEmployee.Columns.Add("employeeName");
            foreach (Employee emp in lEmployee)
            {
                DataRow dr = dtEmployee.NewRow();
                dr[0] = emp.Id;
                dr[1] = emp.Name;
                dtEmployee.Rows.Add(dr);
            }
            return dtEmployee;
        }
コード例 #3
0
        public static DataTable GetCurrentTemporaryRepresentative()
        {
            InventoryEntities inventory = new InventoryEntities();

            IEmployeeBroker employeeBroker = new EmployeeBroker(inventory);
            Employee lEmployee = employeeBroker.GetCurrentTempRep(Util.GetEmployee());

            if (lEmployee != null)
            {
                DataTable dtEmployee = new DataTable();
                dtEmployee.Columns.Add("EmployeeID");
                dtEmployee.Columns.Add("EmployeeName");
                dtEmployee.Columns.Add("Designation");
                dtEmployee.Columns.Add("JoiningDate");
                //foreach (Employee emp in lEmployee)
                //{
                DataRow dr = dtEmployee.NewRow();
                dr["EmployeeID"] = lEmployee.Id;
                dr["EmployeeName"] = lEmployee.Name;
                dr["Designation"] = SystemStoreInventorySystemUtil.Converter.GetDesignationText(SystemStoreInventorySystemUtil.Converter.objToDesignation(lEmployee.Designation));
                dr["JoiningDate"] = SystemStoreInventorySystemUtil.Converter.dateTimeToString(Converter.DATE_CONVERTER.DATE, lEmployee.CreatedDate);
                dtEmployee.Rows.Add(dr);
                //}
                return dtEmployee;
            }
            return null;
        }
コード例 #4
0
        public static DataTable GetCurrentTemporaryHead()
        {
            InventoryEntities inventory = new InventoryEntities();

            IEmployeeBroker employeeBroker = new EmployeeBroker(inventory);
            Employee lEmployee = employeeBroker.GetCurrentTemporaryDeptHead(Util.GetEmployee());

            if (lEmployee != null)
            {
                DataTable dtEmployee = new DataTable();
                dtEmployee.Columns.Add("EmployeeID");
                dtEmployee.Columns.Add("EmployeeName");
                dtEmployee.Columns.Add("Designation");
                dtEmployee.Columns.Add("JoiningDate");
                //foreach (Employee emp in lEmployee)
                //{
                DataRow dr = dtEmployee.NewRow();
                dr[0] = lEmployee.Id;
                dr[1] = lEmployee.Name;
                dr[2] = SystemStoreInventorySystemUtil.Converter.GetDesignationText(SystemStoreInventorySystemUtil.Converter.objToDesignation(lEmployee.Designation));
                dr[3] = lEmployee.CreatedDate;
                dtEmployee.Rows.Add(dr);
                //}
                return dtEmployee;
            }
            return null;
        }
コード例 #5
0
        public static DataTable GetCurrentRepresentative()
        {
            InventoryEntities inventory = new InventoryEntities();

            IEmployeeBroker employeeBroker = new EmployeeBroker(inventory);
            List<Employee> lEmployee = employeeBroker.GetRepresentative(Util.GetEmployee());
            if (lEmployee != null)
            {
            DataTable dtEmployee = new DataTable();
            dtEmployee.Columns.Add("RepresentativeID");
            dtEmployee.Columns.Add("RepresentativeName");
            dtEmployee.Columns.Add("Actual/Temporary");
            foreach (Employee emp in lEmployee)
            {
                DataRow dr = dtEmployee.NewRow();
                dr[0] = emp.Id;
                dr[1] = emp.Name;
                dr[2] = emp.Role.Id == (int)Constants.EMPLOYEE_ROLE.DEPARTMENT_REPRESENTATIVE ? "Actual" : "Temporary";
                dtEmployee.Rows.Add(dr);
            }
            return dtEmployee;
            }
            return null;
        }