コード例 #1
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        public ProductWCF[] getAwaitingItemsForDept(string deptCode)
        {
            List <ConsolidatedRequisitionListDetail> detailList = DeliverRequestController.getAllAwaitingItemsForDept(deptCode);
            List <ProductWCF> pWCFList = new List <ProductWCF>();

            foreach (ConsolidatedRequisitionListDetail detail in detailList)
            {
                Product    p    = detail.Product;
                ProductWCF pWCF = new ProductWCF();

                pWCF.ItemNumber             = p.ItemNumber;
                pWCF.Description            = p.Description;
                pWCF.Category               = p.Category;
                pWCF.ReorderLevel           = p.ReorderLevel != null ? (int)p.ReorderLevel : 0;
                pWCF.ReorderQuantity        = p.ReorderQuantity != null ? (int)p.ReorderQuantity : 0;
                pWCF.UnitofMeasure          = p.UnitOfMeasure;
                pWCF.Bin                    = p.Bin != null ? (int)p.Bin : 0;
                pWCF.Supplier1ID            = p.Supplier1ID;
                pWCF.Supplier2ID            = p.Supplier2ID;
                pWCF.Supplier3ID            = p.Supplier3ID;
                pWCF.AdjustmentVoucherPrice = p.AdjustmentVoucherPrice != null ? (double)p.AdjustmentVoucherPrice : 0.0;
                pWCF.Stock                  = p.Stock.TotalInventoryBalance != null ? (int)p.Stock.TotalInventoryBalance : 0;

                pWCF.ConsolidatedListID     = detail.ConsolidatedListID;
                pWCF.QuantityRequested      = detail.QuantityRequested != null ? (int)detail.QuantityRequested : 0;
                pWCF.ActualQuantityAccepted = detail.ActualQuantity != null ? (int)detail.ActualQuantity : 0;

                pWCFList.Add(pWCF);
            }
            return(pWCFList.ToArray <ProductWCF>());
        }
コード例 #2
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        public AuthResult[] acknowledgecollectitems(ProductWCF[] itemsList)
        {
            List <ConsolidatedRequisitionListDetail> detailList = new List <ConsolidatedRequisitionListDetail>();

            foreach (ProductWCF p in itemsList)
            {
                ConsolidatedRequisitionListDetail detail = new ConsolidatedRequisitionListDetail();
                detail.ConsolidatedListID = p.ConsolidatedListID;
                detail.ItemNumber         = p.ItemNumber;
                detail.QuantityRequested  = p.QuantityRequested;
                detail.ActualQuantity     = p.ActualQuantityAccepted;
                detail.DateRequest        = DateTime.Now;

                detailList.Add(detail);
            }

            bool result = DeliverRequestController.acknowledgeCollectItems(detailList);
            List <AuthResult> resultList = new List <AuthResult>();
            AuthResult        bo         = new AuthResult();

            bo.SuccessResult = result;
            resultList.Add(bo);

            return(resultList.ToArray <AuthResult>());
        }
コード例 #3
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        public EmployeeNameWCF getEmployeeDetails(string empNo)
        {
            Employee        emp  = DeliverRequestController.getEmployee(empNo);
            EmployeeNameWCF name = new EmployeeNameWCF();

            name.Name = emp.Name;

            return(name);
        }
コード例 #4
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        //||||||||||
        //||||||||||ASH
        //||||||||||
        public UpdateCollectionPointWCF updatecollectionpoint(string s1, string s2, string s3)
        {
            Department dep = DeliverRequestController.getdepartmentdetails(s1);

            //  CollectionPoint cp = DeliverRequestController.getcollectionpoint(s2);
            //Employee emp = DeliverRequestController.getEmployeefromname(s3);
            DeliverRequestController.updatedepartmentcollection(dep, s2, s3);
            UpdateCollectionPointWCF upwcf = new UpdateCollectionPointWCF();

            upwcf.SuccessResult = true;
            return(upwcf);
        }
コード例 #5
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        public AuthResult[] checkRepAuthorisation(EmployeeCredentials empCredetials)
        {
            bool successResult = DeliverRequestController.checkAuthorisation(empCredetials.DepartmentCode, empCredetials.RepUsername,
                                                                             empCredetials.RepPassword);
            AuthResult ar = new AuthResult();

            ar.SuccessResult = successResult;

            List <AuthResult> list = new List <AuthResult>();

            list.Add(ar);

            return(list.ToArray <AuthResult>());
        }
コード例 #6
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        //||||||||
        //||||||||ASH
        //||||||||
        public DepartmentWCF getdepartmentfromempid(string empid)
        {
            Department    dep    = DeliverRequestController.getdepartmentfromempid(empid);
            DepartmentWCF depwcf = new DepartmentWCF();

            depwcf.DepartmentCode      = dep.DepartmentCode;
            depwcf.DepartmentName      = dep.DepatmentName;
            depwcf.ContactName         = dep.ContactName;
            depwcf.CollectionPointID   = dep.CollectionPointID;
            depwcf.FaxNo               = dep.FaxNo;
            depwcf.HeadEmployeeNumber  = dep.HeadsEmployeeNumber;
            depwcf.PhoneNo             = dep.PhoneNo;
            depwcf.RepresentativeEmpNo = dep.RepresentativeEmpNo;
            return(depwcf);
        }
コード例 #7
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        /** end by zhu
         * */

        /*** added by ashwin
         * */
        public DepartmentWCF getdepartmentdetails(String deptCode)
        {
            Department    dept   = DeliverRequestController.getdepartmentdetails(deptCode);
            DepartmentWCF depwcf = new DepartmentWCF();

            depwcf.CollectionPointID   = dept.CollectionPointID;
            depwcf.ContactName         = dept.ContactName;
            depwcf.DepartmentCode      = dept.DepartmentCode;
            depwcf.FaxNo               = dept.FaxNo;
            depwcf.HeadEmployeeNumber  = dept.HeadsEmployeeNumber;
            depwcf.PhoneNo             = dept.PhoneNo;
            depwcf.RepresentativeEmpNo = dept.RepresentativeEmpNo;
            depwcf.DepartmentName      = dept.DepatmentName;
            return(depwcf);
        }
コード例 #8
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        public CollectionPointWCF[] allCollectionPointList()
        {
            List <CollectionPointWCF> list = new List <CollectionPointWCF>();

            List <CollectionPoint> cpList = DeliverRequestController.getAllCollectionPoints();

            foreach (CollectionPoint cp in cpList)
            {
                CollectionPointWCF cpWCF = new CollectionPointWCF();
                cpWCF.CollectionPointID = cp.CollectionPointID;
                cpWCF.Name = cp.Name;
                list.Add(cpWCF);
            }

            return(list.ToArray <CollectionPointWCF>());
        }
コード例 #9
0
ファイル: Service.svc.cs プロジェクト: sreeja91/AD-Project
        public DepartmentWCF[] deptsForCollectionPoint(string collectionpointid)
        {
            List <Department> deptList = DeliverRequestController.getAllDeptForCollectionPointID(collectionpointid);

            List <DepartmentWCF> depList = new List <DepartmentWCF>();

            foreach (Department dept in deptList)
            {
                DepartmentWCF deptWCF = new DepartmentWCF();
                deptWCF.DepartmentCode      = dept.DepartmentCode;
                deptWCF.DepartmentName      = dept.DepatmentName;
                deptWCF.ContactName         = dept.ContactName;
                deptWCF.PhoneNo             = dept.PhoneNo;
                deptWCF.FaxNo               = dept.FaxNo;
                deptWCF.HeadEmployeeNumber  = dept.HeadsEmployeeNumber;
                deptWCF.CollectionPointID   = dept.CollectionPointID;
                deptWCF.RepresentativeEmpNo = dept.RepresentativeEmpNo;

                depList.Add(deptWCF);
            }

            return(depList.ToArray <DepartmentWCF>());
        }