コード例 #1
0
        public WKF_CASE_ACTIVITY ParseReaderComplete(DataRow row)
        {
            WKF_CASE_ACTIVITY objReturn = ParseReaderCustom(row);

            if (objReturn != null)
            {
                if (objReturn.WKF_CASE_ID > 0)
                {
                    WKF_CASEDB wKF_CASEDB = new WKF_CASEDB();
                    objReturn.WKF_CASE = wKF_CASEDB.ParseReaderComplete(row);
                }

                if (objReturn.STD_WKFACTIVITYTYPE_ID > 0)
                {
                    STD_WKFACTIVITYTYPEDB sTD_WKFACTIVITYTYPEDB = new STD_WKFACTIVITYTYPEDB();
                    objReturn.STD_WKFACTIVITYTYPE = sTD_WKFACTIVITYTYPEDB.ParseReaderCustom(row);
                }

                if (objReturn.STD_WKFACTIVITYSTS_ID > 0)
                {
                    STD_WKFACTIVITYSTSDB sTD_WKFACTIVITYSTSDB = new STD_WKFACTIVITYSTSDB();
                    objReturn.STD_WKFACTIVITYSTS = sTD_WKFACTIVITYSTSDB.ParseReaderCustom(row);
                }
            }

            return(objReturn);
        }
コード例 #2
0
        public Boolean UpdateStatus(string CURRENT_USER, Int32 CURRENT_REGISTRY_ID, Int32 WKF_CASE_ID, Int32 STD_WKFCASESTS_ID)
        {
            Boolean    objReturn = false;
            WKF_CASEDB objDB     = new WKF_CASEDB();

            SqlConnection sConn = null;
            SqlCommand    sCmd  = null;

            try
            {
                sConn = new SqlConnection(SqlConnectionString);

                sConn.Open();

                sCmd = new SqlCommand("CRS.usp_WKF_CASE_updateStatus", sConn);
                sCmd.CommandTimeout = SqlCommandTimeout;
                sCmd.CommandType    = CommandType.StoredProcedure;
                sCmd.Parameters.AddWithValue("@CURRENT_USER", CURRENT_USER);
                sCmd.Parameters.AddWithValue("@CURRENT_REGISTRY_ID", CURRENT_REGISTRY_ID);
                sCmd.Parameters.AddWithValue("@WKF_CASE_ID", WKF_CASE_ID);
                sCmd.Parameters.AddWithValue("@STD_WKFCASESTS_ID", STD_WKFCASESTS_ID);

                LogDetails logDetails = new LogDetails(String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), CURRENT_USER, CURRENT_REGISTRY_ID);
                sCmd.ExecuteNonQuery();
                LogManager.LogTiming(logDetails);

                objReturn = true;

                sConn.Close();
            }
            catch (Exception ex)
            {
                LogManager.LogError(ex.Message, String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), CURRENT_USER, CURRENT_REGISTRY_ID);
                throw ex;
            }
            finally
            {
                if (sCmd != null)
                {
                    sCmd.Dispose();
                    sCmd = null;
                }
                if (sConn != null)
                {
                    if (sConn.State != ConnectionState.Closed)
                    {
                        sConn.Close();
                    }
                    sConn.Dispose();
                    sConn = null;
                }
            }

            return(objReturn);
        }