当前位置: 首页>>代码示例>>C#>>正文


C# OracleDBObj.CloseConnection方法代码示例

本文整理汇总了C#中OracleDBObj.CloseConnection方法的典型用法代码示例。如果您正苦于以下问题:C# OracleDBObj.CloseConnection方法的具体用法?C# OracleDBObj.CloseConnection怎么用?C# OracleDBObj.CloseConnection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OracleDBObj的用法示例。


在下文中一共展示了OracleDBObj.CloseConnection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetInvoiceCode

 public bool SetInvoiceCode(string userID, double requisition)
 {
     bool ret = true;
     OracleDBObj obj = new OracleDBObj();
     obj.CreateConnection();
     obj.CreateTransaction();
     try
     {
         RequisitionDAL reqDAL = new RequisitionDAL();
         reqDAL.GetDataByLOID(requisition, obj.zTrans);
         if (reqDAL.INVCODE == "")
         {
             reqDAL.INVCODE = OracleDB.GetRunningCode("REQUISITION_INVCODE", reqDAL.REQUISITIONTYPE.ToString(), obj.zTrans);
             ret = reqDAL.UpdateCurrentData(userID, obj.zTrans);
             if (!ret) throw new ApplicationException(reqDAL.ErrorMessage);
         }
         obj.zTrans.Commit();
         obj.CloseConnection();
     }
     catch (Exception ex)
     {
         obj.zTrans.Rollback();
         obj.CloseConnection();
         ret = false;
         _error = ex.Message;
     }
     return ret;
 }
开发者ID:SoftSuite,项目名称:ABB,代码行数:28,代码来源:BillFlow.cs

示例2: SubmitReturnRequisition

        public bool SubmitReturnRequisition(ArrayList arrData, string userID)
        {
            bool ret = true;
            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            try
            {
                for (int i = 0; i < arrData.Count; ++i)
                {
                    DALObj.OnDB = false;
                    DALObj.GetDataByLOID(Convert.ToDouble(arrData[i]), obj.zTrans);
                    if (DALObj.STATUS == Constz.Requisition.Status.Waiting.Code)
                    {
                        DALObj.STATUS = Constz.Requisition.Status.Approved.Code;
                        ret = DALObj.UpdateCurrentData(userID, obj.zTrans);
                        if (!ret) throw new ApplicationException(DALObj.ErrorMessage);

                        ret = DALObj.CutStockRequisition(Convert.ToDouble(arrData[i]), userID, obj.zTrans);
                        if (!ret) throw new ApplicationException(DALObj.ErrorMessage);
                    }
                }
                obj.zTrans.Commit();
                obj.CloseConnection();
            }

            catch (Exception ex)
            {
                obj.zTrans.Rollback();
                obj.CloseConnection();
                ret = false;
                _error = ex.Message;
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:35,代码来源:ReturnRequestFlow.cs

示例3: DeleteBomData

        public bool DeleteBomData(ArrayList arr)
        {
            bool ret = true;
            OracleDBObj obj = new OracleDBObj();
            obj.CreateTransaction();
            try
            {
                for (int i = 0; i < arr.Count; ++i)
                {
                    double product = Convert.ToDouble(arr[i]);
                    if (BarcodeDAL.GetDataByLOID(product, obj.zTrans))
                    {
                        ret = BomItem.DeleteDataByMainProduct(product, obj.zTrans);
                        if (!ret) throw new ApplicationException(BomItem.ErrorMessage);

                        if (ProcessItem.GetDataList("WHERE PRODUCT = " + BarcodeDAL.PRODUCTMASTER.ToString(), obj.zTrans).Rows.Count == 1)
                        {
                            ret = ProcessItem.DeleteDataByProduct(BarcodeDAL.PRODUCTMASTER, obj.zTrans);
                            if (!ret) throw new ApplicationException(ProcessItem.ErrorMessage);
                        }
                    }
                }
                obj.zTrans.Commit();
                obj.CloseConnection();
            }
            catch (Exception ex)
            {
                ret = false;
                obj.zTrans.Rollback();
                obj.CloseConnection();
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:33,代码来源:BomFlow.cs

示例4: UpdateData

        public bool UpdateData(string userID, CreditCardData data)
        {
            bool ret = true;
            if (ValidateData(data))
            {
                OracleDBObj obj = new OracleDBObj();
                obj.CreateConnection();
                obj.CreateTransaction();
                try
                {
                    DALObj.GetDataByLOID(data.LOID, obj.zTrans);
                    DALObj.NAME = data.NAME.Trim();
                    DALObj.CHARGE = data.CHARGE;
                    DALObj.ACTIVE = data.ACTIVE.Trim();

                    if (DALObj.OnDB)
                        ret = DALObj.UpdateCurrentData(userID, obj.zTrans);
                    else
                        ret = DALObj.InsertCurrentData(userID, obj.zTrans);

                    if (!ret)
                    {
                        throw new ApplicationException(DALObj.ErrorMessage);
                    }
                    obj.zTrans.Commit();
                    obj.CloseConnection();
                }
                catch (Exception ex)
                {
                    obj.zTrans.Rollback();
                    obj.CloseConnection();
                    ret = false;
                    _error = ex.Message;
                }
            }
            else
                ret = false;
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:39,代码来源:CreditCardFlow.cs

示例5: UpdateData

        public bool UpdateData(string userID, DepartmentData data)
        {
            bool ret = true;
            if (VeridateData(data))
            {

                OracleDBObj obj = new OracleDBObj();
                obj.CreateConnection();
                obj.CreateTransaction();
                try
                {
                    SearchDAL.GetDataByLOID(data.LOID, obj.zTrans);
                    SearchDAL.LOID = data.LOID;
                    SearchDAL.TNAME = data.TNAME.Trim();
                    SearchDAL.CODE = data.CODE.Trim();
                    SearchDAL.EFDATE = data.EFDATE;
                    SearchDAL.EPDATE = data.EPDATE;

                    if (SearchDAL.OnDB)
                        ret = SearchDAL.UpdateCurrentData(userID, obj.zTrans);
                    else
                        ret = SearchDAL.InsertCurrentData(userID, obj.zTrans);
                   
                    _LOID = SearchDAL.LOID;

                    if (ret)
                    {
                        obj.zTrans.Commit();
                        obj.CloseConnection();
                    }
                    else
                    {
                        _error = SearchDAL.ErrorMessage;
                    }
                }
                catch (Exception ex)
                {
                    obj.zTrans.Rollback();
                    obj.CloseConnection();
                    ret = false;
                    throw new ApplicationException(ex.Message);
                }
            }
            else
                ret = false;
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:47,代码来源:DepartmentFlow.cs

示例6: CommitData

        public bool CommitData(ArrayList arrData, double Approver, string userID)
        {
            bool ret = true;
            OracleDBObj obj = new OracleDBObj();
            obj.CreateTransaction();
            try
            {
                for (int i = 0; i < arrData.Count; ++i)
                {
                    double loid = Convert.ToDouble(arrData[i]);
                    DALObj.OnDB = false;
                    DALObj.GetDataByLOID(loid, obj.zTrans);
                    if (DALObj.STATUS == Constz.Requisition.Status.Waiting.Code)
                    {
                        if (DALItemObj.GetDataList("WHERE STOCKIN = " + loid.ToString(), obj.zTrans).Rows.Count <= 0) throw new ApplicationException("ÃÒ¡ÒÃàÅ¢·Õè " + DALObj.CODE + " äÁèä´éÃкØÃÒ¡ÒÃÊÔ¹¤éÒ");
                        DALObj.APPROVEDATE = DateTime.Today;
                        DALObj.APPROVER = Approver;
                        DALObj.STATUS = Constz.Requisition.Status.Approved.Code;
                        ret = DALObj.UpdateCurrentData(userID, obj.zTrans);
                        if (!ret) throw new ApplicationException(DALObj.ErrorMessage);
                        ret = DALItemObj.UpdateStatusByStockIn(loid, DALObj.STATUS, userID, obj.zTrans);
                        if (!ret) throw new ApplicationException(DALItemObj.ErrorMessage);

                        //ret = DALObj.CutStock(loid, userID, obj.zTrans);
                        ret = DALObj.CutStock(loid, userID, obj.zTrans);
                        if (!ret) throw new ApplicationException(DALObj.ErrorMessage);
                    }
                }
                if (obj.zTrans != null) obj.zTrans.Commit();
                obj.CloseConnection();
            }
            catch (Exception ex)
            {
                ret = false;
                _error = ex.Message;
                if (obj.zTrans != null) obj.zTrans.Rollback();
                obj.CloseConnection();
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:40,代码来源:StockInShopFlow.cs

示例7: UpdateStockCheckStatus

        public bool UpdateStockCheckStatus(string batchno, string status, string userID ,ArrayList arr)
        {
            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            bool ret = true;

            try
            {
                string sql = "UPDATE STOCKCHECK SET STATUS = '" + status + "', ";
                sql += "UPDATEBY = '" + userID + "', ";
                sql += "UPDATEON = " + OracleDB.QRDateTime() + " ";
                sql += "WHERE BATCHNO='" + batchno + "'";

                ret = (OracleDB.ExecNonQueryCmd(sql, obj.zTrans) > 0);
                if (!ret)
                {
                    throw new ApplicationException(OracleDB.Err_NoExistUpdate);
                }

                StockCheckImproveDAL itemDAL = new StockCheckImproveDAL();

                for (Int16 i = 0; i < arr.Count; i++)
                {
                    itemDAL.OnDB = false;
                    StockCheckImproveData item = (StockCheckImproveData)arr[i];
                    double ans = item.SYSQTY + item.IMPROVEQTY;
                    itemDAL.STOCKCHECK = item.STOCKCHECK;
                    itemDAL.PRODUCTSTOCK = item.PRODUCTSTOCK;
                    itemDAL.SYSQTY = item.SYSQTY;
                    itemDAL.IMPROVEQTY = ans;
                    itemDAL.REASON = item.REASON;

                    ret = itemDAL.InsertCurrentData(userID, obj.zTrans);
                    if (!ret) throw new ApplicationException(itemDAL.ErrorMessage);

                    sql = "UPDATE PRODUCTSTOCK SET QTY = '" + ans.ToString() + "', ";
                    sql += "UPDATEBY = '" + userID + "', ";
                    sql += "UPDATEON = " + OracleDB.QRDateTime() + " ";
                    sql += "WHERE LOID='" + item.PRODUCTSTOCK.ToString() + "'";

                    ret = (OracleDB.ExecNonQueryCmd(sql, obj.zTrans) > 0);
                    if (!ret)
                    {
                        throw new ApplicationException(OracleDB.Err_NoExistUpdate);
                    }
                }
                obj.zTrans.Commit();
                obj.CloseConnection();
            }
            catch (Exception ex)
            {
                obj.zTrans.Rollback();
                obj.CloseConnection();
                ret = false;
                _error = ex.Message;
            }

            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:60,代码来源:StockCheckFlow.cs

示例8: UpdateQty

        public bool UpdateQty(double loid, double poloid, double pdloid, double qty, string userID)
        {
            bool ret = true;
            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            try
            {
                UpdateQty(loid, poloid, pdloid, qty, userID, obj.zTrans);

                obj.zTrans.Commit();
                obj.CloseConnection();
            }
            catch (Exception ex)
            {
                obj.zTrans.Rollback();
                obj.CloseConnection();
                ret = false;
                _error = ex.Message;
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:22,代码来源:StockInFlow.cs

示例9: DeleteData

 public bool DeleteData(ArrayList arrData)
 {
     bool ret = true;
     OracleDBObj obj = new OracleDBObj();
     obj.CreateConnection();
     obj.CreateTransaction();
     try
     {
         StockInItemDAL itemDAL = new StockInItemDAL();
         for (int i = 0; i < arrData.Count; i++)
         {
             DALObj.GetDataByLOID(Convert.ToDouble(arrData[i]), obj.zTrans);
             itemDAL.DeleteDataByStockIn(Convert.ToDouble(arrData[i]), obj.zTrans);
             ret = DALObj.DeleteCurrentData(obj.zTrans);
             if (!ret) throw new ApplicationException(DALObj.ErrorMessage);
         }
         obj.zTrans.Commit();
         obj.CloseConnection();
     }
     catch (Exception ex)
     {
         obj.zTrans.Rollback();
         obj.CloseConnection();
         ret = false;
         _error = ex.Message;
     }
     return ret;
 }
开发者ID:SoftSuite,项目名称:ABB,代码行数:28,代码来源:StockInFlow.cs

示例10: CommitQCData

        public bool CommitQCData(string userID, StockInFGData data)
        {
            bool ret = true;
            if (ValidateData(data))
            {
                OracleDBObj obj = new OracleDBObj();
                obj.CreateConnection();
                obj.CreateTransaction();
                try
                {
                    data.QCCODE = OracleDB.GetRunningCode("STOCKIN_QC", data.DOCTYPE.ToString());
                    data.QCDATE = DateTime.Now.Date;
                    UpdateData(userID, data, obj.zTrans);

                    ret = DALObj.CutStock(_LOID, userID, obj.zTrans);
                    if (!ret) throw new ApplicationException(DALObj.ErrorMessage);

                    obj.zTrans.Commit();
                    obj.CloseConnection();
                }
                catch (Exception ex)
                {
                    obj.zTrans.Rollback();
                    obj.CloseConnection();
                    ret = false;
                    _error = ex.Message;
                }
            }
            else
                ret = false;
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:32,代码来源:StockInFlow.cs

示例11: insertStockCheckItem

        public bool insertStockCheckItem(string userID, StockCheckItemData data)
        {
            bool ret = true;
            if (VerifyData(data))
            {
                OracleDBObj obj = new OracleDBObj();
                obj.CreateConnection();
                obj.CreateTransaction();
                try
                {
                    DALItemObj.OnDB = false;
                    DALItemObj.COUNTQTY = data.COUNTQTY;
                    DALItemObj.LOTNO = data.LOTNO;
                    DALItemObj.PRODUCT = data.PRODUCT;
                    DALItemObj.STOCKCHECK = data.STOCKCHECK;
                    DALItemObj.LOCATION = data.LOCATION;

                    ret = DALItemObj.InsertCurrentData(userID, obj.zTrans);
                    if (!ret) throw new ApplicationException(DALItemObj.ErrorMessage);

                    obj.zTrans.Commit();
                    obj.CloseConnection();
                }
                catch (Exception ex)
                {
                    obj.zTrans.Rollback();
                    obj.CloseConnection();
                    ret = false;
                    _error = ex.Message;
                }
            }
            else
            {
                ret = false;
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:37,代码来源:StockCheckBatchFlow.cs

示例12: UpdateData

        public bool UpdateData(string userID, CustomerTypeSearchData data)
        {
            bool ret = true;
            if (VeridateData(data))
            {

                OracleDBObj obj = new OracleDBObj();
                obj.CreateConnection();
                obj.CreateTransaction();
                try
                {
                    DALObj.GetDataByLOID(data.LOID, obj.zTrans);
                    DALObj.LOID = data.LOID;
                    DALObj.NAME = data.NAME.Trim();
                    DALObj.DESCRIPTION = data.DESCRIPTION.Trim();
                    DALObj.ACTIVE = data.ACTIVE.Trim();
                    DALObj.CODE = data.CODE.Trim();
                    DALObj.DISCOUNT = data.DISCOUNT;
                    DALObj.LOWERPRICE = data.LOWERPRICE;

                    if (DALObj.OnDB)
                        ret = DALObj.UpdateCurrentData(userID, obj.zTrans);
                    else
                        ret = DALObj.InsertCurrentData(userID, obj.zTrans);

                    if (ret)
                    {
                        obj.zTrans.Commit();
                        obj.CloseConnection();
                    }
                    else
                    {
                        _error= DALObj.ErrorMessage;
                    }
                }
                catch (Exception ex)
                {
                    obj.zTrans.Rollback();
                    obj.CloseConnection();
                    ret = false;
                    throw new ApplicationException(ex.Message);
                }
            }
            else
                ret = false;
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:47,代码来源:CustomerTypeFlow.cs

示例13: UpdateStockOutOtherStatus

        public bool UpdateStockOutOtherStatus(ArrayList arrData, string status, string userID)
        {
            bool ret = true;
            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            try
            {
                for (int i = 0; i < arrData.Count; i++)
                {
                    //if (status == Constz.Requisition.Status.Approved.Code)
                    //{
                    //    if (GetStockOutItem(arrData[i].ToString()).Rows.Count == 0)
                    //    {
                    //        throw new ApplicationException("äÁèÊÒÁÒö͹ØÁѵÔÃÒ¡ÒÃä´é à¹×èͧ¨Ò¡ºÒ§ÃÒ¡ÒÃäÁèä´éÃкØÊÔ¹¤éÒ");
                    //    }
                    //    StockoutWHData data = GetData(Convert.ToDouble(arrData[i]));
                    //    if (data.CUSTOMER == 0) throw new ApplicationException("äÁèÊÒÁÒö͹ØÁѵÔÃÒ¡ÒÃä´é à¹×èͧ¨Ò¡ºÒ§ÃÒ¡ÒÃäÁèä´éÃкØÅÙ¡¤éÒ");
                    //    if (data.DUEDATE.Year == 1) throw new ApplicationException("äÁèÊÒÁÒö͹ØÁѵÔÃÒ¡ÒÃä´é à¹×èͧ¨Ò¡ºÒ§ÃÒ¡ÒÃäÁèä´é¡Ó˹´Çѹ·ÕèÊè§ÊÔ¹¤éÒ");
                    //}
                    DALObj.OnDB = false;
                    DALObj.GetDataByLOID(Convert.ToDouble(arrData[i]), obj.zTrans);

                    if (DALObj.DOCTYPE == Constz.DocType.ReqRawPD.LOID)
                    {
                        ret = DALObj.UpdatePDProductStatus(Convert.ToDouble(DALObj.PRODUCTLOID), Constz.Requisition.Status.RW.Code, userID, obj.zTrans);
                        if (!ret) throw new ApplicationException(DALObj.ErrorMessage);
                        else
                        {
                            ret = DALObj.UpdatePDOrderStatus(Convert.ToDouble(DALObj.PRODUCTLOID), Constz.Requisition.Status.RW.Code, userID, obj.zTrans);
                            if (!ret) throw new ApplicationException(DALObj.ErrorMessage);

                        }
                    }
                    DALObj.STATUS = Constz.Requisition.Status.Approved.Code;
                    ret = DALObj.UpdateCurrentData(userID, obj.zTrans);

                    if (!ret) throw new ApplicationException(DALObj.ErrorMessage);
                    ret = DALObj.CutStock(Convert.ToDouble(arrData[i]), userID, obj.zTrans);

                    if (!ret) throw new ApplicationException(DALObj.ErrorMessage);
                }
                obj.zTrans.Commit();
                obj.CloseConnection();
            }
            catch (Exception ex)
            {
                obj.zTrans.Rollback();
                obj.CloseConnection();
                ret = false;
                _error = ex.Message;
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:54,代码来源:StockoutFlow.cs

示例14: CommitData

        public bool CommitData(string userID, StockoutWHData data)
        {
            bool ret = true;
            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            try
            {
                UpdateData(userID, data, obj.zTrans);
                DALObj.OnDB = false;

                ret = DALObj.CutStock(_LOID, userID, obj.zTrans);
                if (!ret) throw new ApplicationException(DALObj.ErrorMessage);

                obj.zTrans.Commit();
                obj.CloseConnection();
            }
            catch (Exception ex)
            {
                obj.zTrans.Rollback();
                obj.CloseConnection();
                ret = false;
                _error = ex.Message;
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:26,代码来源:StockoutFlow.cs

示例15: SubmitStockOut

        public bool SubmitStockOut(string userID, double stockOut)
        {
            bool ret = true;
            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            try
            {
                DALObj.OnDB = false;
                DALObj.GetDataByLOID(stockOut, obj.zTrans);
                if (DALObj.STATUS == Constz.Requisition.Status.Waiting.Code)
                {
                    DALObj.STATUS = Constz.Requisition.Status.Approved.Code;

                    ret = DALObj.UpdateCurrentData(userID, obj.zTrans);
                    if (!ret) throw new ApplicationException(DALObj.ErrorMessage);

                    RequisitionDAL rDAL = new RequisitionDAL();
                    rDAL.GetDataByLOID(DALObj.REFLOID, obj.zTrans);
                    rDAL.ACTIVE = Constz.ActiveStatus.InActive;

                    ret = rDAL.UpdateCurrentData(userID, obj.zTrans);
                    if (!ret) throw new ApplicationException(rDAL.ErrorMessage);

                    ret = DALItemObj.UpdateStatusByStockOut(stockOut, DALObj.STATUS, userID, obj.zTrans);
                    if (!ret) throw new ApplicationException(DALItemObj.ErrorMessage);

                    ret = DALObj.CutStock(LOID, userID, obj.zTrans);
                    if (!ret) throw new ApplicationException(DALObj.ErrorMessage);

                }

                obj.zTrans.Commit();
                obj.CloseConnection();
            }
            catch (Exception ex)
            {
                obj.zTrans.Rollback();
                obj.CloseConnection();
                ret = false;
                _error = ex.Message;
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:44,代码来源:StockOutFGFlow.cs


注:本文中的OracleDBObj.CloseConnection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。