/// <summary>
 /// Create a new T_WQX_TRANSACTION_LOG object.
 /// </summary>
 /// <param name="lOG_ID">Initial value of the LOG_ID property.</param>
 /// <param name="tABLE_CD">Initial value of the TABLE_CD property.</param>
 /// <param name="tABLE_IDX">Initial value of the TABLE_IDX property.</param>
 /// <param name="sUBMIT_DT">Initial value of the SUBMIT_DT property.</param>
 /// <param name="sUBMIT_TYPE">Initial value of the SUBMIT_TYPE property.</param>
 public static T_WQX_TRANSACTION_LOG CreateT_WQX_TRANSACTION_LOG(global::System.Int32 lOG_ID, global::System.String tABLE_CD, global::System.Int32 tABLE_IDX, global::System.DateTime sUBMIT_DT, global::System.String sUBMIT_TYPE)
 {
     T_WQX_TRANSACTION_LOG t_WQX_TRANSACTION_LOG = new T_WQX_TRANSACTION_LOG();
     t_WQX_TRANSACTION_LOG.LOG_ID = lOG_ID;
     t_WQX_TRANSACTION_LOG.TABLE_CD = tABLE_CD;
     t_WQX_TRANSACTION_LOG.TABLE_IDX = tABLE_IDX;
     t_WQX_TRANSACTION_LOG.SUBMIT_DT = sUBMIT_DT;
     t_WQX_TRANSACTION_LOG.SUBMIT_TYPE = sUBMIT_TYPE;
     return t_WQX_TRANSACTION_LOG;
 }
Exemplo n.º 2
0
        //*********************** WQX TRANSACTION LOG*******************************
        public static int InsertUpdateWQX_TRANSACTION_LOG(int? lOG_ID, string tABLE_CD, int tABLE_IDX, string sUBMIT_TYPE, byte[] rESPONSE_FILE, 
            string rESPONSE_TXT, string cDX_SUBMIT_TRANS_ID, string cDX_SUBMIT_STATUS, string oRG_ID)
        {
            using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
            {
                //try
                //{
                    T_WQX_TRANSACTION_LOG t = new T_WQX_TRANSACTION_LOG();
                    if (lOG_ID != null)
                        t = (from c in ctx.T_WQX_TRANSACTION_LOG
                             where c.LOG_ID == lOG_ID
                             select c).First();

                    if (lOG_ID == null)
                        t = new T_WQX_TRANSACTION_LOG();

                    if (tABLE_CD != null) t.TABLE_CD = tABLE_CD;
                    t.TABLE_IDX = tABLE_IDX;
                    if (sUBMIT_TYPE != null) t.SUBMIT_TYPE = sUBMIT_TYPE;
                    if (rESPONSE_FILE != null) t.RESPONSE_FILE = rESPONSE_FILE;
                    if (rESPONSE_TXT != null) t.RESPONSE_TXT = rESPONSE_TXT;
                    if (cDX_SUBMIT_TRANS_ID != null) t.CDX_SUBMIT_TRANSID = cDX_SUBMIT_TRANS_ID;
                    if (cDX_SUBMIT_STATUS != null) t.CDX_SUBMIT_STATUS = cDX_SUBMIT_STATUS;
                    if (oRG_ID != null) t.ORG_ID = oRG_ID;

                    if (lOG_ID == null) //insert case
                    {
                        t.SUBMIT_DT = System.DateTime.Now;
                        ctx.AddToT_WQX_TRANSACTION_LOG(t);
                    }

                    ctx.SaveChanges();

                    return t.LOG_ID;
                //}
                //catch
                //{
                //    return 0;
                //}
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the T_WQX_TRANSACTION_LOG EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToT_WQX_TRANSACTION_LOG(T_WQX_TRANSACTION_LOG t_WQX_TRANSACTION_LOG)
 {
     base.AddObject("T_WQX_TRANSACTION_LOG", t_WQX_TRANSACTION_LOG);
 }