public ResponseInfo <string> PostSystemNoti([FromBody] ReqPostSystemNoti data) { try { return(base.PostDataToAPINotAuth <ResponseInfo <string> >(base.apiPathAndQuery, data)); } catch (Exception ex) { throw ex; } }
public ResponseInfo <string> PostSystemNoti([FromBody] ReqPostSystemNoti data) { ResponseInfo <string> res = new ResponseInfo <string>(); try { res = process.PostSystemNoti(data); } catch (Exception ex) { throw ex; } return(res); }
public ResponseInfo <string> PostSystemNoti(ReqPostSystemNoti data) { ResponseInfo <string> res = new ResponseInfo <string>(); try { SODAL.PostSystemNoti(data); res.ResponseData = "Success"; } catch (Exception ex) { throw ex; } return(res); }
public void PostSystemNoti(ReqPostSystemNoti data) { using (IDbConnection connection = GetOpenConnection()) { try { string sql = @"insert into SystemNotification (UserID, MsgTitle,MsgValue, MsgUrl, CreatedBy, CreatedOn) values (@UserID, @MsgTitle, @MsgValue,@MsgUrl, @SystemName, getdate()) "; var param = new DynamicParameters(); param.Add("@UserID", data.UserID); param.Add("@MsgTitle", data.MsgTitle); param.Add("@MsgValue", data.MsgValue); param.Add("@MsgUrl", data.MsgUrl); param.Add("@SystemName", data.SystemName); connection.ExecuteScalar(sql, param, commandType: CommandType.Text); } catch (Exception ex) { throw ex; } } }