예제 #1
0
        public static int UpdateOrderDetailForRawMaterials(int OID, int PID, int IsRawMaterialsUsed, int UsedRawMaterialsAmount, int RawMaterialsID)
        {
            int nResult = -1;

            DataSet ds = new DataSet();

            using (TransactionScope scope1 = new TransactionScope(TransactionScopeOption.Required))
            {
                try
                {
                    DAL.DataProvider.SqlClientProvider oSqlClientProvider = new DAL.DataProvider.SqlClientProvider();


                    nResult = oSqlClientProvider.UpdateOrderDetailForRawMaterials(OID, PID, IsRawMaterialsUsed, UsedRawMaterialsAmount, RawMaterialsID);

                    if (nResult == 0)
                    {
                        scope1.Complete();
                    }
                }
                catch (System.Data.SqlClient.SqlException Exp)
                {
                    //bool rethrow =
                    // ExceptionPolicy.HandleException(Exp, "StoreLocator Data Policy");

                    //if (rethrow)
                    //{
                    //    throw;
                    //}
                }
                catch (Exception Exp)
                {
                    //bool rethrow =
                    // ExceptionPolicy.HandleException(Exp, "StoreLocator Business Policy");

                    //if (rethrow)
                    //{
                    //    throw;
                    //}
                }
            }
            return(nResult);
        }