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


C# OracleDBObj.CreateTransaction方法代码示例

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


在下文中一共展示了OracleDBObj.CreateTransaction方法的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: DeleteData

        public bool DeleteData(ArrayList arrLOID)
        {
            bool ret = true;
            OracleDBObj objDB = new OracleDBObj();

            objDB.CreateConnection();
            objDB.CreateTransaction();

            try
            {
                foreach (double LOID in arrLOID)
                {
                    SupplierDAL oDAL = new SupplierDAL();
                    oDAL.GetDataByLOID(LOID, objDB.zTrans);
                    oDAL.DeleteCurrentData(objDB.zTrans);
                }
                objDB.zTrans.Commit();
                ret = true;
            }
            catch (Exception ex)
            {
                objDB.zTrans.Rollback();
                _error = ex.Message;
                ret = false;
            }

            objDB.CloseConnection();
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:29,代码来源:SupplierSearchFlow.cs

示例5: DeleteStockIn_StockInitemData

        public bool DeleteStockIn_StockInitemData(string userID, ArrayList arrLOID)
        {
            bool ret = true;
            OracleDBObj DBObj = new OracleDBObj();
            DBObj.CreateConnection();
            DBObj.CreateTransaction();

            try
            {
                foreach (string loid in arrLOID)
                {

                    string sqlStockInItem = "DELETE FROM STOCKINITEM WHERE STOCKIN = " + loid;
                    OracleDB.ExecNonQueryCmd(sqlStockInItem, DBObj.zTrans);

                    string sqlStockIn = "DELETE FROM STOCKIN  WHERE LOID = " + loid;
                    OracleDB.ExecNonQueryCmd(sqlStockIn, DBObj.zTrans);
                }
                ret = true;
                DBObj.zTrans.Commit();
            }
            catch (Exception ex)
            {
                ret = false;
                DBObj.zTrans.Rollback();
                _error = ex.Message;
            }

            DBObj.CloseConnection();
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:31,代码来源:ReturnSearchFlow.cs

示例6: UpdateStockInData

        public bool UpdateStockInData(string userID, ArrayList arrLOID)
        {
            bool ret = true;
            OracleDBObj DBObj = new OracleDBObj();
            DBObj.CreateConnection();
            DBObj.CreateTransaction();

            try
            {
                foreach (string loid in arrLOID)
                {
                    string sqlStockIn = "UPDATE STOCKIN SET STATUS = 'AP', APPROVEDATE = TO_DATE(SYSDATE,'DD/MM/YYYY') "; 
                           sqlStockIn += " WHERE LOID = " + loid;
                    OracleDB.ExecNonQueryCmd(sqlStockIn, DBObj.zTrans);

                    string sqlStockInItem = "UPDATE STOCKINITEM SET STATUS = 'AP' WHERE STOCKIN = " + loid;
                    OracleDB.ExecNonQueryCmd(sqlStockInItem, DBObj.zTrans);
                }
                ret = true;
                DBObj.zTrans.Commit();
            }
            catch (Exception ex)
            {
                ret = false;
                DBObj.zTrans.Rollback();
                _error = ex.Message;
            }

            DBObj.CloseConnection();
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:31,代码来源:ProductStockInShopFlow.cs

示例7: UpdateData

        public bool UpdateData(string userID, DivisionData 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;
                    SearchDAL.ABBNAME = data.ABBNAME;
                    SearchDAL.DEPARTMENT = data.DEPARTMENT;

                    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,代码行数:49,代码来源:DivisionFlow.cs

示例8: CancelPlan

        public bool CancelPlan(string userID, double plan)
        {
            bool ret = true;

            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            try
            {
                PlanProduceDAL produceDAL = new PlanProduceDAL();
                PlanPurchaseDAL purchaseDAL = new PlanPurchaseDAL();
                PlanReceiveDAL receiveDAL = new PlanReceiveDAL();
                PlanReceiveItemDAL receiveItemDAL = new PlanReceiveItemDAL();
                PlanRemainDAL remainDAL = new PlanRemainDAL();
                PlanSaleDAL saleDAL = new PlanSaleDAL();
                PlanUseDAL useDAL = new PlanUseDAL();

                DALObj.OnDB = false;
                DALObj.GetDataByLOID(plan, obj.zTrans);
                if (DALObj.STATUS == Constz.Requisition.Status.Approved.Code)
                {
                    DALObj.STATUS = Constz.Requisition.Status.Void.Code;
                    DALObj.ACTIVE = Constz.ActiveStatus.InActive;
                    ret = DALObj.UpdateCurrentData(userID, obj.zTrans);
                    if (!ret) throw new ApplicationException(DALObj.ErrorMessage);

                    produceDAL.UpdateStatusByPlan(plan, DALObj.STATUS, userID, obj.zTrans);
                    purchaseDAL.UpdateStatusByPlan(plan, DALObj.STATUS, userID, obj.zTrans);
                    receiveDAL.UpdateStatusByPlan(plan, DALObj.STATUS, userID, obj.zTrans);
                    receiveItemDAL.UpdateStatusByPlan(plan, DALObj.STATUS, userID, obj.zTrans);
                    remainDAL.UpdateStatusByPlan(plan, DALObj.STATUS, userID, obj.zTrans);
                    saleDAL.UpdateStatusByPlan(plan, DALObj.STATUS, userID, obj.zTrans);
                    useDAL.UpdateStatusByPlan(plan, DALObj.STATUS, 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,代码行数:47,代码来源:PlanInventoryFlow.cs

示例9: 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

示例10: UpdateData

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

                OracleDBObj obj = new OracleDBObj();
                obj.CreateConnection();
                obj.CreateTransaction();
                try
                {
                    DALObj.GetDataByLOID(data.LOID, obj.zTrans);
                    DALObj.CODE = data.CODE.Trim();
                    DALObj.NAME = data.NAME.Trim();
                    DALObj.CHARGE = data.CHARGE;
                    DALObj.ACTIVE = Constz.ActiveStatus.Active;

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

                    _LOID = DALObj.LOID;

                    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,代码行数:46,代码来源:CreditCardFlow.cs

示例11: UpdateData

        public bool UpdateData(string userID,StockinProductData 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.PRODUCT = data.PRODUCT;
                    DALObj.UNIT = data.UNIT;
                    DALObj.LOID = data.PDPRODUCT;
                    DALObj.LOTNO = data.LOTNO.Trim();
                    DALObj.PRODUCTNAME = data.PRODUCTNAME.Trim();

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

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

示例12: UpdateData

        public bool UpdateData(string userID, PurchaseOrderData data)
        {
            bool ret = true;
            if (ValidateData(data))
            {
                OracleDBObj obj = new OracleDBObj();
                obj.CreateConnection();
                obj.CreateTransaction();
                try
                {
                    DALObj.OnDB = false;
                    DALObj.GetDataByLOID(data.LOID, obj.zTrans);

                    DALObj.CODE = data.CODE;
                    DALObj.SENDPODATE = data.SENDPODATE;
                    DALObj.SENDPO = data.SENDPO;
                    DALObj.SENDOTHER = data.SENDOTHER;
                    DALObj.REFSUPPCODE = data.REFSUPPCODE;

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

                    _LOID = DALObj.LOID;
                    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,代码行数:45,代码来源:PDOrderFlow.cs

示例13: DeleteData

        public bool DeleteData(ArrayList arrLOID)
        {
            bool ret = true;
            OracleDBObj objDB = new OracleDBObj();

            objDB.CreateConnection();
            objDB.CreateTransaction();

            try
            {
                foreach (double LOID in arrLOID)
                {

                    string sqlPackage = "DELETE FROM PACKAGE WHERE MAINPRODUCT = " + LOID.ToString();
                    ret = (OracleDB.ExecNonQueryCmd(sqlPackage, objDB.zTrans) > 0);
                    if (!ret) _error = OracleDB.Err_NoDelete;
                    //else _OnDB = false;

                    string sqlProduct = "DELETE FROM PRODUCT WHERE LOID = " + LOID.ToString();
                    ret = (OracleDB.ExecNonQueryCmd(sqlProduct, objDB.zTrans) > 0);
                    if (!ret) _error = OracleDB.Err_NoDelete;
                   // else _OnDB = false;
                }
                objDB.zTrans.Commit();
                ret = true;
            }
            catch (OracleException ex)
            {
                ret = false;
                _error = OracleDB.GetOracleExceptionText(ex);
            }
            catch (Exception ex)
            {
                objDB.zTrans.Rollback();
                _error = ex.Message;
                ret = false;
            }

            objDB.CloseConnection();
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:41,代码来源:BasketSearchFlow.cs

示例14: InsertData

        public bool InsertData(string userID, ProductMonthData data)
        {
            bool ret = true;

            DALObj.PRODUCT = DALObj.doGetProduct(data.CODE);
            DALObj.M1 = data.Month[0];
            DALObj.M2 = data.Month[1];
            DALObj.M3 = data.Month[2];
            DALObj.M4 = data.Month[3];
            DALObj.M5 = data.Month[4];
            DALObj.M6 = data.Month[5];
            DALObj.M7 = data.Month[6];
            DALObj.M8 = data.Month[7];
            DALObj.M9 = data.Month[8];
            DALObj.M10 = data.Month[9];
            DALObj.M11 = data.Month[10];
            DALObj.M12 = data.Month[11];
         
            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            try
            {
                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;
                throw new ApplicationException(ex.Message);
            }
            return ret;
        }
开发者ID:SoftSuite,项目名称:ABB,代码行数:40,代码来源:ProductMonthFlow.cs

示例15: 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


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