public void ResolveName()
        {
            Guid?requesterGuid = EmployeeBLL.ResolveEmployeeName(this.RequesterName);

            if (requesterGuid == null)
            {
                throw new Exception("No employee found with the specified name!");
            }
            else
            {
                this.RequestedBy = requesterGuid.Value;
            }


            Guid?approverGuid = EmployeeBLL.ResolveEmployeeName(this.ApproverName);

            if (approverGuid == null)
            {
                throw new Exception("No employee found with the specified name!");
            }
            else
            {
                this.ApprovedBy = approverGuid.Value;
            }
        }
Ejemplo n.º 2
0
        public void ResolveName()
        {
            Guid?receiverGuid = EmployeeBLL.ResolveEmployeeName(this.ReceiverName);

            if (receiverGuid == null)
            {
                throw new Exception("No employee found with the specified name!");
            }
            else
            {
                this.ReceivedBy = receiverGuid.Value;
            }


            //Guid? delivererGuid = EmployeeBLL.ResolveEmployeeName(this.DelivererName);
            //if (delivererGuid == null)
            //    throw new Exception("No employee found with the specified name!");
            //else
            //    this.DeliveredBy = delivererGuid.Value;


            Guid?verifierGuid = EmployeeBLL.ResolveEmployeeName(this.VerifierName);

            if (verifierGuid == null)
            {
                throw new Exception("No employee found with the specified name!");
            }
            else
            {
                this.VerifiedBy = verifierGuid.Value;
            }
        }
Ejemplo n.º 3
0
        public DataTable GeStoreIssueVoucherList(Guid WorkUnit, Guid ItemID, string strIssuedTo, DateTime IssueDate, DateTime IssueDate2, DateTime ApprovedDate, DateTime ApprovedDate2)
        {
            Guid?IssuedTo = EmployeeBLL.ResolveEmployeeName(strIssuedTo);

            if (IssuedTo == null)
            {
                IssuedTo = new Guid("00000000-0000-0000-0000-000000000000");
            }


            return(SQLHelper.getDataTable(ConnectionString, "GetStoreIssueVouchers", WorkUnit, ItemID, IssuedTo, IssueDate, IssueDate2, ApprovedDate, ApprovedDate2));
        }
Ejemplo n.º 4
0
        public void ResolveName()
        {
            Guid?preparerGuid = EmployeeBLL.ResolveEmployeeName(this.PreparerName);

            if (preparerGuid == null)
            {
                throw new Exception("No employee found with the specified name!");
            }
            else
            {
                this.PreparedBy = preparerGuid.Value;
            }


            Guid?checkerGuid = EmployeeBLL.ResolveEmployeeName(this.CheckerName);

            if (checkerGuid == null)
            {
                throw new Exception("No employee found with the specified name!");
            }
            else
            {
                this.CheckedBy = checkerGuid.Value;
            }

            Guid?approverGuid = EmployeeBLL.ResolveEmployeeName(this.ApproverName);

            if (approverGuid == null)
            {
                throw new Exception("No employee found with the specified name!");
            }
            else
            {
                this.ApprovedBy = approverGuid.Value;
            }

            if (this.ReceiverName != "")
            {
                Guid?receiverGuid = EmployeeBLL.ResolveEmployeeName(this.ReceiverName);
                if (receiverGuid == null)
                {
                    throw new Exception("No employee found with the specified name!");
                }
                else
                {
                    this.ReceivedBy = receiverGuid.Value;
                }
            }

            if (this.ArrivalConfirmerName != "")
            {
                Guid?arrivalConfirmerGuid = EmployeeBLL.ResolveEmployeeName(this.ArrivalConfirmerName);
                if (arrivalConfirmerGuid == null)
                {
                    throw new Exception("No employee found with the specified name!");
                }
                else
                {
                    this.ArrivalConfirmedBy = arrivalConfirmerGuid.Value;
                }
            }
        }