Esempio n. 1
0
        public override DataSet Approve(object objEntityp)
        {
            clsDirectInsurerPayment objEntity = (clsDirectInsurerPayment)(objEntityp);

            EntityProcesses objProcess = base.getProcessObject(objEntity.UserId.ToString(), EntityType.JOURNAL, objEntity.Status, objEntity.JournalNo, "1");

            try
            {
                base.BeginTransaction();
                if (base.StartProcess(objProcess))
                {
                    DataSet ds = ApproveReceipt(objEntity);
                    if (ds != null && ds.Tables.Count > 0 && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0] != null && ds.Tables[0].Rows[0]["Result"] != null)
                    {
                        objProcess.EntityCurrentStatus = objEntity.Status;
                        objProcess.EntityID            = ds.Tables[0].Rows[0]["Result"].ToString();
                    }
                    base.CommitProcess(objProcess);
                    base.CommitTransaction();
                    return(ds);
                }
                else
                {
                    // base.RollbackProcess(objProcess, EntityType.RECEIPT.ToString());
                    throw (new Exception("Receipt Can not be approved. Error: Process is not eligible on this entity status."));
                }
            }
            catch (Exception ex)
            {
                base.RollbackProcess(objProcess, EntityType.RECEIPT.ToString());
                throw (new Exception("Receipt Can not be approved. Error: " + ex.Message));
            }
        }
Esempio n. 2
0
        private DataSet ApproveReceipt(clsDirectInsurerPayment objEntity)
        {
            // implement the logic here
            clsACCommon objAccountBAL = new clsACCommon();
            DataSet     dsApprove     = new DataSet();

            if (ProcessMasterInfo.EntityStatus == RECEIPT_STATUS_APPROVED)
            {
                if (objEntity.JournalNo != "")
                {
                    DataTable dt = objAccountBAL.funSaveJournalDetails(objEntity, objEntity.AuditLogHeader, true, true);
                    dsApprove.Tables.Add(dt);
                }
            }
            //else
            //    dsApprove = objClientBI.SaveUnApprovedInfo(objClient);
            objAccountBAL = null;
            return(dsApprove);
        }
Esempio n. 3
0
        public override DataSet Reject(object objEntityp)
        {
            clsDirectInsurerPayment objEntity = (clsDirectInsurerPayment)(objEntityp);

            return(Reject(objEntity));
        }