/// <summary> /// 取得分行註記 /// </summary> /// <param name="model">畫面model</param> /// <param name="strField">回傳資料</param> /// <param name="msg">回傳訊息</param> /// <returns>bool</returns> public static bool LoadOrgBranchMark(WorkTimeViewModel model, out string strField, out string msg) { bool result = false; msg = ""; strField = ""; try { using (var conn = new SqlConnection() { ConnectionString = DbHelper.getConnectionStrings(_attendantDBName).ConnectionString }) { try { var objField = conn.ExecuteScalar(WorkTimeSql.LoadOrgBranchMark(), model); if (objField != null) { strField = objField.ToString().Trim(); } } catch (Exception) { throw; } } result = true; } catch (Exception ex) { msg = ex.Message; } return(result); }